Re: view page source or save after load
- From: James Stroud <jstroud@xxxxxxxxxxxx>
- Date: Thu, 21 Sep 2006 05:14:40 GMT
zephron2000 wrote:
Hey,
I need to either:
1. View the page source of a webpage after it loads
or
2. Save the webpage to my computer after it loads (same as File > Save
Page As)
urllib is not sufficient (using urlopen or something else in urllib
isn't going to do the trick)
Any ideas?
Thanks,
Lara
I happen to be tweaking a module that does this as your question came in. The relevant lines are:
fetchparams = urllib.urlencode(fetchparams)
wwwf = urllib.urlopen("?".join([baseurl, fetchparams]))
afile = open(filename, "w")
afile.write(wwwf.read())
afile.close()
James
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095
http://www.jamesstroud.com/
.
- References:
- view page source or save after load
- From: zephron2000
- view page source or save after load
- Prev by Date: Re: naming objects from string
- Next by Date: Re: naming objects from string
- Previous by thread: view page source or save after load
- Next by thread: Re: view page source or save after load
- Index(es):
Relevant Pages
|