Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Not able Login into webpage which use javascript while load

by sundialsvc4 (Abbot)
on Jun 23, 2017 at 14:30 UTC ( #1193368=note: print w/replies, xml ) Need Help??


in reply to Not able Login into webpage which use javascript while load

Another alternative strategy that can be considered is Selenium (see: http://seleniumhq.org), which uses an actual web browser to interact with the host, under programmatic control.   While often used for web site testing, it can also be used for other things.   It can specifically be used to get data from very JavaScript-centric sites since the site is talking to a real browser.

Search for the keyword "Selenium" at http://search.cpan.org and you will see that this tool is very well-supported by Perl.   The selenium web-site also contains a lot of documentation that should be reviewed carefully.

While, depending entirely on the site, the task still might not be easy, Selenium might make it possible.

Perhaps, Selenium could be used to get far enough that the login sequence has been completed, and you can extract cookies or other tokens that could be used in the subsequent exchanges that could be driven by other Perl technologies.   Unfortunately, there is no way to predict what might work best – or, at all.

  • Comment on Re: Not able Login into webpage which use javascript while load

Replies are listed 'Best First'.
Re^2: Not able Login into webpage which use javascript while load
by choroba (Chancellor) on Jun 23, 2017 at 15:44 UTC
    What do you mean by "Another alternative" and "actual web browser" (emphasis original)? Do you consider Chrome, Firefox, and Phantom non-actual browsers?
    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1193368]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2017-09-25 17:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (286 votes). Check out past polls.

    Notices?