Really strange. I am wondering if it is a python limitation.
I added this block.
Make a URL request with the predefined headers above
try:
r = requests.get(page_url, headers=headers, timeout=3)
except Timeout:
print('The request timed out')
It made no difference and i never got an exception.