Skip to content

Commit

Permalink
Add Instance name to FediFetcher UA [fixes #122]
Browse files Browse the repository at this point in the history
  • Loading branch information
nanos committed Jun 24, 2024
1 parent 624801d commit a23d6fe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion find_posts.py
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,11 @@ def get(url, headers = {}, timeout = 0, max_tries = 5):
"""A simple wrapper to make a get request while providing our user agent, and respecting rate limits"""
h = headers.copy()
if 'User-Agent' not in h:
h['User-Agent'] = 'FediFetcher (https://go.thms.uk/mgr)'
h['User-Agent'] = f"FediFetcher (+{arguments.server}; https://go.thms.uk/ff)"
logger.debug(f"User Agent: {h['User-Agent']}")


raise Exception('error')

if timeout == 0:
timeout = arguments.http_timeout
Expand Down

0 comments on commit a23d6fe

Please sign in to comment.