Created
April 19, 2012 18:22
-
-
Save mkuklis/2422811 to your computer and use it in GitHub Desktop.
playing with phantomjs, pjscrape and jQuery :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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