-
Notifications
You must be signed in to change notification settings - Fork 185
Open
Description
yarn global add phantomjs-prebuilt
// ./doc/examples/HackerNews.js
var sjs = require('../../src/Scraper');
/*
Scrape the news in Hacker News.
*/
sjs.DynamicScraper
.create('https://news.ycombinator.com')
.scrape(function ($) {
return $('.title a').map(function () {
console.log($(this).text());
return $(this).text();
}).get().filter(function (elm) {
return elm != 'More';
});
})
.then(function (news) {
news.forEach(function (elm) {
console.log(elm);
});
}).catch(function (err) {
console.error(err);
});run and did not get any result...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels