From 12fa16be8b157334ac17bb8759a92b87c7e9a5ed Mon Sep 17 00:00:00 2001 From: davidemarcoli Date: Fri, 22 Nov 2024 10:56:15 +0100 Subject: [PATCH] fix: add User-Agent header to torrentio request --- src/program/services/scrapers/torrentio.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/program/services/scrapers/torrentio.py b/src/program/services/scrapers/torrentio.py index 317cedab..566867bf 100644 --- a/src/program/services/scrapers/torrentio.py +++ b/src/program/services/scrapers/torrentio.py @@ -45,7 +45,8 @@ def validate(self) -> bool: return False try: url = f"{self.settings.url}/{self.settings.filter}/manifest.json" - response = self.request_handler.execute(HttpMethod.GET, url, timeout=10) + headers = {"User-Agent": "Mozilla/5.0"} + response = self.request_handler.execute(HttpMethod.GET, url, timeout=10, headers=headers) if response.is_ok: return True except Exception as e: