mattsse / chromiumoxide

Chrome Devtools Protocol rust API
Apache License 2.0
749 stars 77 forks source link

Use request intercept with connect() on an existing Chromium instance #146

Open steve-the-crab opened 1 year ago

steve-the-crab commented 1 year ago

Hi, thanks for your work on this. It's been really nice to work with so far.

Is it possible to do request interception with an existing Chromium instance do you know?

I have made a naive attempt to get this working by copying the code base into my workspace and modifying the connect function in browser.rs such that it takes a BrowserConfig and replaces config: None on line 67 with the supplied config, but the result is that the example code for interception appears to be unsuccessful.

Might there be a way to achieve this?

Thanks!

j-mendez commented 9 months ago

@steve-the-crab yes, use Browser::connect_with_config and pass in request_intercept.