Skip to content

Commit

Permalink
Add User-Agent header for RSS feed requests
Browse files Browse the repository at this point in the history
Fixes #93
  • Loading branch information
j6k4m8 committed Sep 30, 2024
1 parent 14cf38c commit cc99630
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion goosepaper/storyprovider/rss.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_stories(self, limit: int = 5, **kwargs) -> List[Story]:
if self._since is not None and date < self._since:
continue

req = requests.get(entry["link"])
req = requests.get(entry["link"], headers={'User-Agent': 'goosepaper/0.7.1'})
# Source is the URL root:
source = urllib.parse.urlparse(entry["link"]).netloc
if not req.ok:
Expand Down

0 comments on commit cc99630

Please sign in to comment.