2024-04-21 11:56:10 +00:00
|
|
|
import requests
|
|
|
|
|
2024-04-21 12:08:37 +00:00
|
|
|
|
2024-04-21 11:56:10 +00:00
|
|
|
def checkInternet():
|
|
|
|
try:
|
|
|
|
requests.get(
|
2024-04-21 12:08:37 +00:00
|
|
|
'https://rest.ensembl.org/info/ping?content-type=application/json',
|
2024-04-21 11:56:10 +00:00
|
|
|
)
|
|
|
|
return True
|
|
|
|
except requests.ConnectionError:
|
2024-04-21 12:08:37 +00:00
|
|
|
return False
|