r = ''
while r == '':
try:
r = requests.get(Url, headers = headers)
except (requests.exceptions.ConnectionError, requests.exceptions.ChunkedEncodingError) as err:
log_(err + ' Put to sleep before retrying.')
time.sleep(100)
continue