Advertisement
dereksir

Untitled

Feb 28th, 2024 (edited)
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. async function scraper() { 
  2.     //...
  3.  
  4.     // set the browser options
  5.     const options = new firefox.Options().addArguments('--headless');
  6.  
  7.     // initialize the webdriver
  8.     const driver = new Builder()
  9.         .forBrowser('firefox')
  10.         // add the proxy to the webdriver
  11.         .setProxy(proxy.manual({
  12.             http: proxyString,
  13.             https: proxyString,
  14.         }))
  15.         .setFirefoxOptions(options)
  16.         .build();
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement