Changed user-agent to 'fediverse's stats (fediverse@mastodont.cat)'

This commit is contained in:
spla 2022-03-12 17:34:58 +01:00
pare 213bd73cbe
commit 1636e86b6d
S'han modificat 3 arxius amb 4 adicions i 4 eliminacions

Veure arxiu

@ -72,7 +72,7 @@ class Server:
try:
user_agent = {'User-agent': 'Mozilla/5.0'}
user_agent = {'User-agent': "fediverse's servers stats (fediverse@mastodont.cat)"}
data = requests.get('https://' + server + api, headers = user_agent, timeout=3)

Veure arxiu

@ -81,7 +81,7 @@ async def getsoft(server):
url = 'https://' + server
user_agent = {'User-agent': 'Mozilla/5.0'}
user_agent = {'User-agent': "fediverse's stats (fediverse@mastodont.cat)"}
timeout = aiohttp.ClientTimeout(total=3)

Veure arxiu

@ -50,7 +50,7 @@ def get_peers(peer):
try:
user_agent = {'User-agent': 'Mozilla/5.0'}
user_agent = {'User-agent': "fediverse's stats (fediverse@mastodont.cat)"}
response = requests.get('https://' + peer + peers_api, headers = user_agent, timeout=3)
@ -127,7 +127,7 @@ if __name__ == '__main__':
world_peers = []
user_agent = {'User-agent': 'Mozilla/5.0'}
user_agent = {'User-agent': "fediverse's stats (fediverse@mastodont.cat)"}
res = requests.get('https://' + mastodon_hostname + peers_api, headers = user_agent, timeout=3)