Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: jQuery & Perl?

by Corion (Patriarch)
on Sep 22, 2014 at 18:14 UTC ( [id://1101555]=note: print w/replies, xml ) Need Help??


in reply to Re^2: jQuery & Perl?
in thread jQuery & Perl?

It's not that easy. The Javascript function ContestPop() could do many things that are not readily understood by Perl, unless Perl understood Javascript, which it doesn't.

I suggest you learn about HTTP and find out what request is made when you (as a human) click on the Javascript link. For example the Mozilla Live Headers Extension can show you what HTTP requests are made. Most browsers have such tools built into them so you can conveniently analyze what goes over the wire.

After you've found out what data gets send, all that remains is replicating that using Perl.

As an alternative, there are implementations of the WWW::Mechanize API that "understand" Javascript by running the Javascript in a browser. Two examples are WWW::Mechanize::Firefox and WWW::Mechanize::PhantomJS. But these both need the respective browser installed. Also, they still require you to understand the difference between Javascript and Perl, and you will also need to understand where HTTP comes into play.

Replies are listed 'Best First'.
Re^4: jQuery & Perl?
by jellisii2 (Hermit) on Sep 23, 2014 at 11:54 UTC
    Selenium may be a good option as well. There are perl modules to drive it. WWW::Selenium might be a good start.

Log In?
Username:
Password:

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

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

    No recent polls found