Refreshing of urllib.urlopen()

Michael Gruenstaeudl michael.gruenstaeudl at mail.utexas.edu
Thu Feb 4 04:33:08 CET 2010


Hi,
I am fairly new to Python and need advice on the urllib.urlopen()  
function. The website I am trying to open automatically refreshes  
after 5 seconds and remains stable thereafter. With  
urllib.urlopen().read() I can only read the initial but not the  
refreshed page. How can I access the refreshed page via  
urlopen().read()? I have already tried to intermediate with  
time.sleep() before invoking .read() (see below), but this does not  
work.

page=urllib.urlopen(url)
time.sleep(20)
htmltext=page.readlines()

Thanks,
Michael G.










More information about the Python-list mailing list