[Tutor] HTTP_User_Agent?
juno@gamefire.com
juno@gamefire.com
Wed, 23 May 2001 22:33:24 -0700
Hey Daniel,
I had the same problem until I removed the 4.0, then it worked. Try this:
h.putheader('User-Agent', 'Mozilla')
That should do it.
Hunter
-----Original Message-----
From: tutor-admin@python.org [mailto:tutor-admin@python.org]On Behalf Of
Daniel Coughlin
Sent: Wednesday, May 23, 2001 4:32 PM
To: tutor@python.org
Subject: [Tutor] HTTP_User_Agent?
Hello Everyone,
I am trying to create a web client using python for use testing asp. My
problem
is formulating a user agent header so that the server thinks my bot is
mozilla/4.0 compatible.
I have written a test asp page that returns the user agent varible. And this
works fine with an ordinary browser.
My python script contains the following line:
h.putheader('User-Agent', 'Mozilla/4.0')
However, when I test the script against my test page, no user_agent is
returned
at all.
So I am guessing I have written it incorrectly. Does anyone out there know
how
to do this sort of thing?
Many thanks in advance,
Daniel
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor