Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

is it possible to use request interceptor with third a remote browser? #709

Open
jordibonastrem opened this issue Sep 7, 2023 · 0 comments

Comments

@jordibonastrem
Copy link

jordibonastrem commented Sep 7, 2023

so im using adsbrowser currently, i have tried to setup requestinterceptor with adsbrowser but it doesnt interfere the requests,
here is the code i use to create driver

    response = requests.post("http://local.adspower.net:50325/api/v1/user/create", json=payload)
    id = response.json()["data"]["id"]

    open_url = "http://local.adspower.com:50325/api/v1/browser/start?user_id=" + id
    resp = requests.get(open_url).json()
    if resp["code"] != 0:
        print(resp["msg"])
        print("please check ads_id")
        return
    chrome_driver = resp["data"]["webdriver"]
    caps = DesiredCapabilities().CHROME
    caps["pageLoadStrategy"] = "eager"
    chrome_options = webdriver.ChromeOptions()
    chrome_options.add_experimental_option("debuggerAddress", resp["data"]["ws"]["selenium"])
    driver = webdriver.Chrome(chrome_driver, options=chrome_options,desired_capabilities = caps)

i think the problem is that in order to use adsbrowser i need to use remote browser

    chrome_options.add_experimental_option("debuggerAddress", resp["data"]["ws"]["selenium"])
@jordibonastrem jordibonastrem changed the title is it possible to use request interceptor with third party browsers like adsbrowser? is it possible to use request interceptor with third a remote browser? Sep 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant