Код: Выделить всё
def try_site(url):
request = requests.get(url)
return request.status_code == 200
Подробнее здесь: https://stackoverflow.com/questions/688 ... ing-python
Код: Выделить всё
def try_site(url):
request = requests.get(url)
return request.status_code == 200