Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Perl script to login into one url and again need to use the url

by Corion (Patriarch)
on Aug 23, 2017 at 10:42 UTC ( [id://1197864]=note: print w/replies, xml ) Need Help??


in reply to Perl script to login into one url and again need to use the url

I think you will likely have more success using WWW::Mechanize, as it bundles usual browser behaviour in a more compact way than using LWP::UserAgent directly.

For web automation, you will have to understand how HTML and HTTP interact. Logging into a website is usually done through a HTML form. You submit that form with the needed values. WWW::Mechanize has the ->submit_form method for that.

  • Comment on Re: Perl script to login into one url and again need to use the url
  • Download Code

Replies are listed 'Best First'.
Re^2: Perl script to login into one url and again need to use the url
by thanos1983 (Parson) on Aug 23, 2017 at 12:21 UTC

    Hello again jitender,

    I agree with fellow monk Corion.I do not have too much experience on this area but I did not proposed that earlier because I thought you want to use strictly the LWP::UserAgent module. Any way, here is a working example that does exactly what you want Perl Script to login to a secure WebSite by using the WWW::Mechanize module.

    Hope this helps, BR.

    Seeking for Perl wisdom...on the process of learning...not there...yet!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-04-19 06:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found