2019-01-30 23:53:09 +01:00
|
|
|
const se_scraper = require('./../index.js');
|
|
|
|
|
|
|
|
let config = {
|
2019-02-27 20:58:13 +01:00
|
|
|
search_engine: 'google',
|
2019-01-30 23:53:09 +01:00
|
|
|
debug: false,
|
|
|
|
verbose: false,
|
2019-02-27 20:58:13 +01:00
|
|
|
keywords: ['news', 'se-scraper'],
|
|
|
|
num_pages: 1,
|
2019-02-28 15:34:25 +01:00
|
|
|
output_file: 'examples/results/data.json',
|
2019-01-30 23:53:09 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
function callback(err, response) {
|
|
|
|
if (err) { console.error(err) }
|
|
|
|
console.dir(response, {depth: null, colors: true});
|
|
|
|
}
|
|
|
|
|
|
|
|
se_scraper.scrape(config, callback);
|