views:

59

answers:

2

I'm trying to pullout some info from an external site using jQuery and Adobe AIR. Right now I'm using a hidden div and jQuery's load function to load fragments of the external site, once the info is loaded I parse some info with selectors. This is fine but it's kinda dirty and I need to perform this several times (don't want to need many hidden divs).

Just wondering if anybody knows a good webscrapper written in jQuery or maybe another method I'm missing

+1  A: 

You can simply call $.ajax, then create a detached DOM tree by writing $(responseHTML).

SLaks
+1  A: 

You can use selectors directly on the ajax response body:

$.get('http://somewhere.com', '',
    function (html) {
        var scrapedElement = $("#myelement", html);
    }
);
FRotthowe