17 lines
301 B
Python

#!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from urllib2 import urlopen
except:
from urllib.request import urlopen
def checkurl(url='https://ariadne.geophysik.rub.de/trac/PyLoT'):
try:
urlopen(url, timeout=1)
return True
except:
pass
return False