Add Instance name to FediFetcher UA [fixes #122]
This commit is contained in:
parent
624801d0cb
commit
a23d6fe1fb
1 changed files with 5 additions and 1 deletions
|
|
@ -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"""
|
"""A simple wrapper to make a get request while providing our user agent, and respecting rate limits"""
|
||||||
h = headers.copy()
|
h = headers.copy()
|
||||||
if 'User-Agent' not in h:
|
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:
|
if timeout == 0:
|
||||||
timeout = arguments.http_timeout
|
timeout = arguments.http_timeout
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue