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

[Nodriver] _prepare_headless bug #2013

Open
boludoz opened this issue Sep 9, 2024 · 2 comments
Open

[Nodriver] _prepare_headless bug #2013

boludoz opened this issue Sep 9, 2024 · 2 comments

Comments

@boludoz
Copy link

boludoz commented Sep 9, 2024

fixed:

    async def _prepare_headless(self):

        if getattr(self, "_prep_headless_done", None):
            return
        response = await self._send_oneshot(
            cdp.browser.get_version()
        )
        if response:
            await self._send_oneshot(
                cdp.network.set_user_agent_override(
                    user_agent=response[3].replace("Headless", ""),
                )
            )
            setattr(self, "_prep_headless_done", True)
            return
        
        raise Exception("could not find Headless in user agent string")
@daisuke-oikawa7070
Copy link

thanks!

@boludoz
Copy link
Author

boludoz commented Sep 17, 2024

@ultrafunkamsterdam Can I comment on your repo? Obviously with your prior supervision.

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

2 participants