Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Scraping Ajax / JS pop-up

by kino (Initiate)
on Feb 16, 2012 at 02:01 UTC ( [id://954121]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Scraping Ajax / JS pop-up
in thread Scraping Ajax / JS pop-up

Monk-E, everything that JavaScript does is client-side, so it has to send a request back to the server at some point, and you can just use Perl to mimic that request. If you want a solution that completely automates JavaScript in any situation then you need to make a script that parses JavaScript, which would take an enormous amount of time.
Instead you might,for example, download firebug for FireFox, right click and Inspect the Element of the particular button you're wandering about and see what address is being requested from the server, use regular expressions to isolate that address and then just have your script get() that address and continue.

He picked the perl from the dying flesh and held it in his palm, and he turned it over and saw that its curve was perfect in the hand he had smashed against the gate; the torn flesh of the knuckles was turned grayish white by the sea water. ~Steinbeck's "The Perl"

Replies are listed 'Best First'.
Re^4: Scraping Ajax / JS pop-up
by Monk-E (Initiate) on Feb 16, 2012 at 02:50 UTC
    Thanks. There is a theme here. I'll definitely look into this direction. Guess I had hope that the module plug-ins for handling JavaScript would be able to handle this (and perhaps I was overlooking a powerful module or function or misusing). Thanks for a pointer in the right direction.

Log In?
Username:
Password:

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

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

    No recent polls found