From e6099bea77b6ee57340710d35dcae699bcb2e88a Mon Sep 17 00:00:00 2001 From: Eduardo HCS Date: Tue, 31 Dec 2024 17:02:14 -0400 Subject: [PATCH] Meta: Add User-Agent string on request for download_file --- Meta/download_file.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Meta/download_file.py b/Meta/download_file.py index 538d4c8d1e1..2dce56c67db 100644 --- a/Meta/download_file.py +++ b/Meta/download_file.py @@ -74,7 +74,10 @@ def main(): os.makedirs(output_file.parent, exist_ok=True) - request = urllib.request.Request(args.url, headers={"Accept-Encoding": "gzip"}) + request = urllib.request.Request(args.url, headers={ + "Accept-Encoding": "gzip", + "User-Agent": "Serenity Meta/download_file.py", + }) with urllib.request.urlopen(request) as f: try: with tempfile.NamedTemporaryFile(delete=False, dir=output_file.parent) as out: