On Sat, Oct 18, 2008 at 1:32 PM, Kent Johnson <[EMAIL PROTECTED]> wrote:
>> For the headers, I did verify that it sent the headers as I had formed them
>> (just not in the right order) with wireshark. So my method does work, I also
>> got this method from here:
>> http://www.voidspace.org.uk/python
On Sat, Oct 18, 2008 at 12:26 PM, xbmuncher <[EMAIL PROTECTED]> wrote:
> Apparently, the right
> page was a redirection of the original page. When I used to use cURL in PHP
> I remember that it had an option to automatically follow redirects. How can
> I do this with urllib2?
urllib2 will follow H
Thanks for the insight Kent. The problem wasn't because of the httpOnly
cookies, I just wasn't requesting the right page. I did get it to send me
the httpOnly cookies when I requested the right page. Apparently, the right
page was a redirection of the original page. When I used to use cURL in PHP
I
On Thu, Oct 16, 2008 at 11:40 PM, xbmuncher <[EMAIL PROTECTED]> wrote:
> I'm trying to mimic my firefox browser in requesting a webpage with python.
> So I tried trusty ol' urllib2 to request it in python:
> import urllib2
>
>
> url = 'http://www.website.com'
>
> #headers
> h = {
> 'User-Agent' :
I'm trying to mimic my firefox browser in requesting a webpage with python.
Here are the headers obtained by wireshark when I accessed it with firefox:
GET /dirName/ HTTP/1.1
Host: www.website.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3)
Gecko/2008092417 Firefox/3.0.3