load a web page and save source as text
David Allen
s2mdalle at titan.vcu.edu
Sat May 6 22:53:03 EDT 2000
In article
<478201EBFBB5F6AD.F52C1F134DC64CE2.190F3DA75E7EBCE3 at lp.airnews.net>,
"technology" <technology at mylinuxisp.com> wrote:
> From python I want to be able to request a web age and save the source
> as text. do I import a html module?
>
> what is the syntax to send a html request and and then assign results to
> variable. I then would write the variable to a file correct?
Check out urllib if you actually want to grab a URL quickly and easily.
But with regard to the HTML request, it's actually an HTTP request,
and you would normally send:
GET filename.html\r\n
and then listen for output from the server.
--
David Allen
http://opop.nols.com/
----------------------------------------
Firearms are second only to the Constitution in importance; they are the
peoples' liberty's teeth.
-- George Washington
More information about the Python-list
mailing list