This is a part of my code in Python:
url="http://export.finam.ru/very long line"
data = urlopen(url).read()
These urls are changing, but they are 100% don't have mistakes. Sometimes my script freeze at this place. Nothing happens. urlopen cannot get data. No error messages come. Script just waiting for an hours. How can I break this waiting and start
data = urlopen(url).read()
again? Comments showed that timeout parameter will solve my problem. How can I use it to restart
data = urlopen(url).read()
?