Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Scraping AJAX?

by Dave_COS (Initiate)
on Jan 26, 2012 at 17:14 UTC ( #950169=note: print w/replies, xml ) Need Help??


in reply to Re: Scraping AJAX?
in thread Scraping AJAX?

I do know XPath.

More details: I'm trying to scrape a Blackberry Administration Service webpage, which is behind a firewall; otherwise I would have given that link.

I'm trying to get the element

//div\@id='dojox_grid__View_5'/div/div/div/div/table/tbody/tr/td20/span"

Which Chrome "Inspect element" sees, and the Selenium IDE sets every time -- but when I try to run against WWW:Mechanize it shows NO content, and the Selenium packages state that element does not exist.

Forgive me if the solution is obvious, but I *have* read the other posts -- and tried the code -- and have had no success.

Replies are listed 'Best First'.
Re^3: Scraping AJAX?
by kelchris (Novice) on Jan 26, 2012 at 17:40 UTC
    Thats because you need to get() the JSON data which contains the actual table you want to scrape. The content you are getting is only the page that contains the JS functions and there should also be the ajax link in there you can use to get the actual data.

    Once you get that link, get() it then parse the data from there.

      Forgive me again if this is answered elsewhere --

      Is there a way to do this on a headless system? firefox insists on a display....

      System: Ubuntu server 10.04

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://950169]
help
Chatterbox?
[Discipulus]: it is for my father: it is impossible to tell him to learn a newer OS
[Lady_Aleena]: To tell him or teach him?
Discipulus anyway xp is still the best lowend game machine
[Discipulus]: both: everyting must be identical in the new v-machine
[Lady_Aleena]: So putting a nice DE or WM up on a Linux machine is not an option?
[Discipulus]: i need some converter to have directly an OVF format directly: at the moment i'm trying with vmware converter standalone
[Lady_Aleena]: I don't know what to tell you. I can barely get my Linux machine to do things I want.
[Discipulus]: if DE or WM means desktop env and win manager.. no, not an option
[Lady_Aleena]: That's what they mean, at least to me. 8)

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (11)
As of 2017-05-22 18:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?