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/
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to