I am fetching data from a URL using urllib2.urlopen
:
from urllib2 import urlopen
...
conn = urlopen(url)
data = conn.read()
conn.close()
Suppose the data did not "come out" as I had expected.
What would be the best method for me to read it again?
I am currently repeating the whole process (open, read, close).
Is there a better way (some sort of connection-refresh perhaps)?