se-scraper/examples/quickstart.js
2019-07-07 19:38:28 +02:00

30 lines
664 B
JavaScript

const se_scraper = require('./../src/node_scraper.js');
(async () => {
let browser_config = {
debug_level: 1,
test_evasion: false,
headless: true,
block_assets: false,
random_user_agent: false,
log_http_headers: false,
html_output: false,
};
let scrape_job = {
search_engine: 'bing',
keywords: ['auto verkaufen'],
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();
})();