Its not a useragent problem, and yes, the cookies are saved across. I'm pretty
sure its a bug in mechanize, but I am not able to find or solve it.
Thats why I'm asking for your help.
Have
you tried using Firefox's User-Agent? Their servers may be doing
something different because they think you're using a different browser.
Also, make sure your second request contains the cookies issued in the first
response.
On Mon, Mar 22, 2010 at 12:37 PM, Ido <[email protected]> wrote:
>
>>
>Hello,
>
>I'm trying to write a scrapper to read my billing
>stats from orange bill4u site using py-mechanize.
>Orange uses a hell
>of a lot of redirects in the process, and I'm not sure if there's a bug
>in mechanize,
>>
>or I am doing something wrong.
>
>I've used wireshark to trace the
>login and redirects of the process using a normal browser,
>for some
>reason, at some point I'm getting a redirect to a different url which
>there I get an http 400 error.
>>
>After trying to trace, I've found out small differences between the
>wireshark output of firefox and mechanize (in the url/cookies),
>when
>the second
> link (br.open) is being invoked.
>I wish if someone could help out
>write a similar script (doesn't have to be with mechanize).
>
>This
>is one of my attempts:
>
>br = Browser()
>resp = br.open("https://bill4u.orange.co.il/action/mainAction")
>>
>br.select_form(name="aspnetForm")
># fill form
>resp =
> br.submit()
>
>br.open("https://direct.orange.co.il/selfservice/gateway.jsp?loginTo=LOGNET&catID=452&actionID=690")
>
>The links above are somewhat what happens when logging in with
>firefox.
>
>________________________________
> Get your new Email address!
>>Grab the Email name you've always wanted before someone else does!
>_______________________________________________
>>Python-il mailing list
>[email protected]
>http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il
>
>
New Email addresses available on Yahoo!
Get the Email name you've always wanted on the new @ymail and @rocketmail.
Hurry before someone else does!
http://mail.promotions.yahoo.com/newdomains/aa/_______________________________________________
Python-il mailing list
[email protected]
http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il