Open kubante opened 6 years ago
Hi there, when trying to use the dynamicscraper i get error
Error: Can't find variable: $
My package.json looks like so:
"async": "^2.6.0", "cheerio": "^1.0.0-rc.2", "jquery": "^3.3.1", "phantom": "^4.0.12", "phantomjs": "^1.9.8", "request": "^2.83.0", "scraperjs": "^1.2.0"
my scraper is pretty basic:
var scraperjs = require('scraperjs');
scraperjs.DynamicScraper.create('https://SOME_url') .scrape(function($) { return $(".a13adeccca0d0e02 a").map(function() { return $(this).attr('href'); }).get(); }) .then(function(news) { console.log(news); })
Hi there, when trying to use the dynamicscraper i get error
Error: Can't find variable: $
My package.json looks like so:
my scraper is pretty basic:
var scraperjs = require('scraperjs');
scraperjs.DynamicScraper.create('https://SOME_url') .scrape(function($) { return $(".a13adeccca0d0e02 a").map(function() { return $(this).attr('href'); }).get(); }) .then(function(news) { console.log(news); })