From 74fc5dd8730f305756d364276d3076cef95dc00e Mon Sep 17 00:00:00 2001 From: iongpt <135581102+iongpt@users.noreply.github.com> Date: Mon, 24 Jul 2023 16:19:13 +0200 Subject: [PATCH] Add user-agent to download-model.py requests (#3243) --- extensions/superbooga/download_urls.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/superbooga/download_urls.py b/extensions/superbooga/download_urls.py index efe300d2..424a9885 100644 --- a/extensions/superbooga/download_urls.py +++ b/extensions/superbooga/download_urls.py @@ -4,7 +4,10 @@ import requests def download_single(url): - response = requests.get(url, timeout=5) + headers = { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3' + } + response = requests.get(url, headers=headers, timeout=5) if response.status_code == 200: return response.content else: