Skip to content

Commit

Permalink
fix: add User-Agent header to torrentio request
Browse files Browse the repository at this point in the history
  • Loading branch information
davidemarcoli committed Nov 22, 2024
1 parent 3511e6c commit 12fa16b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/program/services/scrapers/torrentio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 12fa16b

Please sign in to comment.