Beefy Boxes and Bandwidth Generously Provided by pair Networks kudra
Perl: the Markov chain saw
 
PerlMonks  

Re: LWP fails where browser succeeds?

by Gangabass (Priest)
on Jul 20, 2012 at 02:41 UTC ( #982746=note: print w/ replies, xml ) Need Help??


in reply to LWP fails where browser succeeds?

Try the same thing in your browser but with Javascript disabled (I recommend to clear cookies too).

Sometimes some sites set cookies via Javascript and if your agent doesn't execute Javascript you'll have "Bad request" error.

I'm using Firefox HTTPFox for this: just record the session and after that compare cookies send to you from site and cookies send by your browser on next request.

Anyway you need to send exactly same request to the target site (I mean button coordinates, empty form fields etc) to get it work.I


Comment on Re: LWP fails where browser succeeds?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://982746]
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: (11)
As of 2014-04-21 16:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (496 votes), past polls