Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async function scraper() {
- // select a proxy from the pool
- const proxy = proxyPool[Math.floor(Math.random() * proxyPool.length)];
- // set browser options
- const options = new firefox.Options().addArguments('--headless');
- // initialize the webdriver
- const driver = new Builder()
- .forBrowser('firefox')
- // add the proxy to the webdriver
- .setProxy(proxy.manual({
- http: proxy,
- https: proxy,
- }))
- .setFirefoxOptions(options)
- .build();
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement