Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Can't get Mechanize to download file

by CJ7 (Novice)
on Mar 11, 2016 at 23:02 UTC ( #1157507=note: print w/replies, xml ) Need Help??


in reply to Re: Can't get Mechanize to download file
in thread Can't get Mechanize to download file

If it handles cookies correctly as you say then why doesn't it work?

As I said in my question, it does work in my browser.

When I run Wireshark I can see it getting a cookie but I don't know how to emulate this in Mechanize.

  • Comment on Re^2: Can't get Mechanize to download file

Replies are listed 'Best First'.
Re^3: Can't get Mechanize to download file
by Anonymous Monk on Mar 11, 2016 at 23:31 UTC

    If it handles cookies correctly as you say then why doesn't it work?

    Because of all the reasons explained in the FAQ , but basically,

    because websites still discriminate based on browser identification headers

    cookies are often set through javascript or web bugs, and mech doesn't javascript or load/GET images, you have to help it do those things

    When I run Wireshark I can see it getting a cookie but I don't know how to emulate this in Mechanize.

    Have you checked to see if mechanize is already getting this cookie?

    Have you checked to see if mechanize is getting that same url?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1157507]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (1)
As of 2022-07-07 17:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?