mirror of
https://github.com/NikolaiT/se-scraper.git
synced 2025-08-09 13:55:04 +02:00
tested and works
This commit is contained in:
17
examples/quickstart.js
Normal file
17
examples/quickstart.js
Normal file
@ -0,0 +1,17 @@
|
||||
const se_scraper = require('./../index.js');
|
||||
|
||||
let config = {
|
||||
search_engine: 'duckduckgo',
|
||||
debug: false,
|
||||
verbose: false,
|
||||
keywords: ['news'],
|
||||
num_pages: 2,
|
||||
output_file: 'data.json',
|
||||
};
|
||||
|
||||
function callback(err, response) {
|
||||
if (err) { console.error(err) }
|
||||
console.dir(response, {depth: null, colors: true});
|
||||
}
|
||||
|
||||
se_scraper.scrape(config, callback);
|
Reference in New Issue
Block a user