Skip to content

Instantly share code, notes, and snippets.

@mkuklis
Created April 19, 2012 18:22
Show Gist options
  • Save mkuklis/2422811 to your computer and use it in GitHub Desktop.
Save mkuklis/2422811 to your computer and use it in GitHub Desktop.
playing with phantomjs, pjscrape and jQuery :)
pjs.addSuite({
url: 'http://ithaca.craigslist.org/apa/',
scraper: function () {
var listings = [];
$('blockquote p a').each(function () {
var item = $(this);
listings.push({url: item.attr('href'), text: item.text()});
});
return listings;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment