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!