Skip to content

Commit

Permalink
Passing down headless mode parameter to "addScraper" function in scra…
Browse files Browse the repository at this point in the history
…perBox,

this, along with the fix on scraperBox.js will enable headless mode for quickscrape

ContentMine#63
  • Loading branch information
lanzer committed Oct 29, 2015
1 parent 19cefd9 commit 3f3a001
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/quickscrape.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ if (program.scraperdir) {
}
if (program.scraper) {
var definition = fs.readFileSync(program.scraper);
var scraper = new Scraper(JSON.parse(definition));
var scraper = new Scraper(JSON.parse(definition), program.headless);
if (!scraper.valid) {
scraper.on('definitionError', function(problems) {
log.error('the scraper provided was not valid for the following reason(s):');
Expand Down Expand Up @@ -208,7 +208,7 @@ var processUrl = function(url) {
// load the scraper definition(s)
var scrapers = new ScraperBox(program.scraperdir);
if (program.scraper) {
scrapers.addScraper(program.scraper);
scrapers.addScraper(program.scraper, program.headless);
}
if (scrapers.scrapers.length == 0) {
log.warn('no scrapers ')
Expand Down

0 comments on commit 3f3a001

Please sign in to comment.