-
Notifications
You must be signed in to change notification settings - Fork 124
/
quickstart.js
36 lines (29 loc) · 854 Bytes
/
quickstart.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
const se_scraper = require('./../src/node_scraper.js');
(async () => {
let browser_config = {
test_evasion: false,
log_http_headers: false,
log_ip_address: false,
random_user_agent: false,
apply_evasion_techniques: true,
screen_output: false,
html_output: false,
clean_html_output: true,
};
let scrape_job = {
search_engine: 'google',
keywords: ['buy a nice car'],
num_pages: 1,
google_settings: {
"gl": "us",
"hl": "en",
"start": 0,
"num": 10
}
};
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();
})();