omkarcloud / botasaurus

The All in One Framework to build Awesome Scrapers.
https://www.omkar.cloud/botasaurus/
MIT License
1.47k stars 136 forks source link

Adding ability to connect to a remote browser via setting a remote debugger address or via CDP would be a game changer #205

Open raunaqss opened 1 week ago

raunaqss commented 1 week ago

HI Chetan,

Thanks for building Botasaurus

I have a feature request: Adding the ability to use Botasaurus with remote instances of Chrome via CDP or setting the remote debugger address (something nondriver allows).

I understand if it doesn't make sense to add, as it may not be a priority for your users but I think it would be a game changer and so thought I should note it down here.

In case this is already possible via ChromeOptions but undocumented, please let me know

piyushhanchate commented 4 days ago

Hey,

I was able to achieve it this way:

     port =  driver.config.port
     browser = playwright.chromium.connect_over_cdp(f"http://localhost:{port}")