Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import requests
- import datetime
- adresses = ['https://rage.mp', 'https://pypi.org', 'https://forum.pticevod.com/gusi-f5.html',
- 'http://domcorova.ru''https://wotspeak.org/mods/']
- def recuest(address, count):
- print(f'{count} запросов по адресу', address)
- print('время начала', datetime.datetime.now())
- for i in range(count):
- time = datetime.datetime.now()
- response = requests.get(address)
- time = datetime.datetime.now() - time
- print(str(i).ljust(5), response.status_code, time)
- print('время окончания:', datetime.datetime.now())
- for address in adresses:
- recuest(address, 200)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement