forkeado de spla/fediverse
Changed user-agent to 'fediverse's stats (fediverse@mastodont.cat)'
This commit is contained in:
pare
213bd73cbe
commit
1636e86b6d
S'han modificat 3 arxius amb 4 adicions i 4 eliminacions
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Referencia en una nova incidència