how to save a whole web page with something block

Herta herta.hy at gmail.com
Tue Aug 10 10:02:06 EDT 2010


Hi everyone,

I want to save a web page. I use urllib to parse the web page. But I
find the saved file, where some content  is missing. The missing part
is block from the original web page, such as this part  <div
style="display: block;" id="GeneInts">...</div>.I don't know how to
parse a whole page without something block in it. Could you help me
figure it out? Thank you!


This is my program

url = 'http://receptome.stanford.edu/hpmr/SearchDB/getGenePage.asp?
Param=4502931&ProtId=1&ProtType=Receptor'
f = urllib.urlretrieve(url,'test.html')



More information about the Python-list mailing list