"Ajax" transfers the data over HTTP, just like regular web pages. So, just use whatever you use to scrape data from regular web pages. You will need to treat the results a bit differently - if JavaScript is returned, you will need to interpret it from your script.
Alternatively, you can try to automate the website from the outside, by using, for example, Win32::IE::Mechanize, and then capturing the traffic using Sniffer::HTTP. Where exactly do you have problems?
| [reply] |
| [reply] |
By google tasks, I mean this. I'm trying to auto login into gmail and then scrape all the tasks from there. Unsuccessful yet
:(
| [reply] |
| [reply] |
Well, I see about 219 CPAN packages for “GMail” at search.cpan.org, and 548 for “Google,” so perhaps you could start there...
Remember: “DRY = Don't Repeat Yourself.” In fact, don't repeat anyone in the world if you can help it.
You can be absolutely sure that you are not the first person to have worked on getting useful information from Google or GMail. You can also be sure that, as soon as someone's put together a decent and general-purpose “way to do that,” it's going to show up on CPAN. Therefore, practical software-development in the Perl world consists very heavily of searching for, discovering, and then leveraging existing well-tested software assets from CPAN and other sources. Your task is surely no exception. There is absolutely nothing about “dealing with AJAX, either as a client or as a server,” that you must “invent.”
This way of thinking does take some getting used to, because in the academic world “borrowing somebody else's work” is called “cheating.”
| |