begin to parse a web page not entirely downloaded

k0mp Michel.Al1 at gmail.com
Thu Feb 8 12:42:01 EST 2007


Hi,

Is there a way to retrieve a web page and before it is entirely
downloaded, begin to test if a specific string is present and if yes
stop the download ?
I believe that urllib.openurl(url) will retrieve the whole page before
the program goes to the next statement. I suppose I would be able to
do what I want by using the sockets module, but I'm sure there's a
simpler way to do it.




More information about the Python-list mailing list