-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathmain.js
24 lines (20 loc) · 988 Bytes
/
main.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
const ChromeWebScraper = require('./src/chrome-web-store-scraper')
const scraper = new ChromeWebScraper()
const fs = require('fs')
async function main () {
// scraper.search('scraper',{scrollAttempts:200,locale:'da'}).then(
// (res) => console.log(res[0]),
// (err) => console.log(err)
// );
// scraper.scrapeApp('https://chrome.google.com/webstore/detail/vidiq-vision-for-youtube/pachckjkecffpdphbpmfolblodfkgbhl')
// scraper.scrapeApp('https://chrome.google.com/webstore/detail/scraper-crawler-v3/kbhidgghgflkbalnkoeokcipocmigkfh')
scraper.scrapeApp('https://chrome.google.com/webstore/detail/restlet-client-rest-api-t/aejoelaoggembcahagimdiliamlcdmfm')
.then(
(res) => {
fs.writeFile(`${res.header.title.replace(' ', '_')}_scraping.json`,JSON.stringify(res,null,2),() => console.log('Output Saved')),
console.log('Complete:', res.reviews, 'Number of reviews:', res.reviews.length)
},
(err) => console.log(err)
)
}
main()