in scripts/cronjobs/urlutils.py [0:0]
def main():
print(URLexists('https://www.apache.org/'))
print(URLexists('https://www.apache.org/__'))
print(URLexists('https://__.apache.org/'))
resp = URLopen('https://www.apache.org/')
print(resp.headers)
try:
fc = UrlCache(cachedir='x')
raise AssertionError("Expected OSError")
except OSError as ex:
print('Expected: %s' % ex)
fc = UrlCache(interval=0)
name = "_wao.html"
fc._deleteCacheFile(name) # pylint: disable=protected-access
icla_info = fc.get("http://www.apache.org/", name, encoding='utf-8')
print(icla_info.readline().rstrip())
print(icla_info.readline().rstrip())
print(icla_info.readline().rstrip())
print(icla_info.readline().rstrip())
icla_info = fc.get("http://www.apache.org/", name, encoding='utf-8')
fc._deleteCacheFile(name) # pylint: disable=protected-access