Connecting puppeteer to an existing Brave Browser instance using

21 Views Asked by At

Hi i have a script that would scrape relevant data from a website, and i want to create a headless browser that has a remote connection to the brave browser that is requesting for the website to be scraped.

But I couldn't use the $ brave-browser --remote-debugging-port=xxxx command when trying to access the json file from http://localhost:9222/json to grab the <id> of the current instance of the browser to use in my script with puppeteer:

 // Connect to an existing Brave browser instance
 const browser = await puppeteer.connect({
   browserWSEndpoint: 'ws://127.0.0.1:9222/devtools/browser/<id>',
 });

so if I try to access the json in brave browser it says that This site can't be reached. But for google chrome it works, and I can access the json file from http://localhost:9222/json.

  • There are no toggle buttons to enable remote debugging in brave browser.
  • Tried different browser (Google chrome) it works.
0

There are 0 best solutions below