Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature requests #10

Open
ImNotOssy opened this issue Nov 7, 2024 · 3 comments
Open

feature requests #10

ImNotOssy opened this issue Nov 7, 2024 · 3 comments

Comments

@ImNotOssy
Copy link

I would love if the websocket issue was fixed, Im aware this is a nodriver fork and its an issue there and here.
image
it sometimes connects but fails to send anything/navigate to pages but after a while it does work but since that initial break it throws the error or sometimes just refuses to connect all together and it breaks.

I would also like a built in proxy handler, at the moment im using the extension method to run a proxy in the browser. seems to work fine but i would like if it could be inside the library instead.

@stephanlensky
Copy link
Owner

Could you add a bit more detail about what's happening here?

  • Does this only happen when you first start the browser? Or does it run for a while normally and then disconnect?
  • You said it sometimes works? Is it just random?

I would also like a built in proxy handler, at the moment im using the extension method to run a proxy in the browser. seems to work fine but i would like if it could be inside the library instead.

Could you use the --proxy-server command shown here?

Otherwise it sounds like you might need to change your system proxy settings.

@ImNotOssy
Copy link
Author

Hi, Im looking at that proxy server thing and it doesn't have a way to authenticate, thats why im using the proxy extension and it works fine.

Yeah the WebSocket issue, it happens when i first start up the browser using uc.start, looks like sometimes it doesn't immediately start working and it throws the error that the server rejected the connection with error code 500, and then later on in my code i will have another browser.get and that actually works but since i have an error catcher it breaks all together.
Just seems like sometimes its delayed and sometimes it just refuses to connect all together.

Ive implemented a retry loop for the websocket connection function on the connection.py file and it doesn't seem to solve the issue when it flat out refuses to connect.

@therealpurplemana
Copy link

Use this to setup a proxy for your browser or tab and pass forward the credentials:

        def auth_challenge_handler(event):
            tab.feed_cdp(
                cdp.fetch.continue_with_auth(
                    request_id=event.request_id,
                    auth_challenge_response=cdp.fetch.AuthChallengeResponse(
                        response="ProvideCredentials",
                        username=username,
                        password=password,
                    ),
                )
            )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants