Im trying to pass this error im getting while checking if sites are up with python: socks.SOCKS5Error: 0x06: TTL expired
proxies = {
'http': 'socks5h://127.0.0.1:9050',
'https': 'socks5h://127.0.0.1:9050'
}
with open("links.txt", "r") as text_file:
for line in text_file.readlines():
url = str(line).replace('\n', '')
try:
r = requests.get(url, proxies=proxies)
print(r)
except:
print("SOCKS5 TTL ERROR")
pass
Im trying to just continue down list if this error occurs but it tries to handle the exception and stops my script with error instead of passing. The script returns 200 for site that is up but it stops on a site that hangs in browser as well.