stupid question about html page
Mithrandir
mithrandiragainwiki at mailinator.com
Thu Jul 1 04:16:05 EDT 2010
luca72 <lucaberto at libero.it> wrote in news:abfb7720-6132-4b7b-8084-
5c1a481647e8 at y11g2000yqm.googlegroups.com:
> hello
> with webbrowser i open the html or php etc page, how i can save the
> opened page with python?
>
> Thanks
>
> Luca
Not sure of a way to capture info from a browser (like Firefox.) I know
though that you can save the source of an page with:
import urllib
urllib.urlretrieve("http://www.example.com/", "Fun.html")
You still need a web browser to read it formatted. (If you are on a web
page in Firefox, and want to save it, click File>Save Page As...)
If you want to save a picture from the Net see:
http://www.daniweb.com/code/snippet216796.html
Good luck!
--
People should read more.
https://secure.wikimedia.org/wikipedia/en/wiki/User:MithrandirAgain
"All that is gold does not glitter,
not all those who wander are lost;
the old that is strong does not wither,
deep roots are not reached by the frost.
>From the ashes a fire shall be woken,
a light from the shadows shall spring;
renenwed shall be blade that was broken,
the crownless again shall be king."
More information about the Python-list
mailing list