Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

webscraping using Phonegap

I need to build a cross-platform app (IOS + Android) that requires some web scraping capabilities.
What I need it to do is to login on certain sites, grab the relevant information and present a combined overview of data from these sites.

So is there any way to accomplish web scraping in phonegap?

like image 622
Krishna Avatar asked Jun 19 '14 11:06

Krishna


Video Answer


1 Answers

It's easy, just use Ajax to request a page.

Use something like JQuery to make the Ajax easier to work with.

Use JavaScript's regular expressions to extract what you want from the Ajax response. You could also use a Dom parser library of some sort as well for more direct access.

Make sure you have your PhoneGap config set up correctly for making Ajax requests. See AJAX Request from Phonegap Android fails

like image 111
SoldierOfFortran Avatar answered Oct 21 '22 08:10

SoldierOfFortran