view http info when browsing

Peter van Kampen news at woody.datatailors.com
Sun Sep 5 22:01:54 EDT 2004


In article <56d498d9.0409051725.1c7d3258 at posting.google.com>, ben wrote:
> I'm trying to write a web client script in python to log onto a web
> page and pull some information off of it.  The page has quite a few
> behind the scenes http things going on that are making it difficult to
> write the python script.  I think if I could see the raw http data
> that comes to my browser life would be much easier.  Does anybody know
> of programs that would run alongside my browser and show the http data
> that is send back and forth?
> 
> I've looked at plugins like httpwatch and iewatch.  httpwatch looks
> good but it costs quite a bit of money, and the trial is not fully
> functional.  iewatch has a free trial, but they don't show cookie
> info, which is important.

from urllib import urlopen
r = urlopen("http://www.python.org/")
print r.headers

You can also take a look at mozilla firefox and download the excellent
webdeveloper extension. It also allows you to view headers and lots of other
stuff.

Hth,

PterK


-- 
Peter van Kampen
pterk -- at -- datatailors.com



More information about the Python-list mailing list