forked from extern/se-scraper
22 lines
534 B
JavaScript
22 lines
534 B
JavaScript
const se_scraper = require('./../src/node_scraper.js');
|
|
|
|
(async () => {
|
|
let browser_config = {
|
|
debug_level: 1,
|
|
output_file: 'examples/results/data.json',
|
|
};
|
|
|
|
let scrape_job = {
|
|
search_engine: 'baidu',
|
|
keywords: ['cat', 'mouse'],
|
|
num_pages: 1,
|
|
};
|
|
|
|
var scraper = new se_scraper.ScrapeManager(browser_config);
|
|
await scraper.start();
|
|
|
|
var results = await scraper.scrape(scrape_job);
|
|
console.dir(results, {depth: null, colors: true});
|
|
await scraper.quit();
|
|
})();
|