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 Request] Add a hook to customize "wait_for_load_state" behavior #656

Open
moonk-banksalad opened this issue Sep 12, 2024 · 1 comment

Comments

@moonk-banksalad
Copy link

Is your feature request related to a problem? Please describe.
Hello, I am trying to scrap a SPA page where "domcontentloaded" or "networkidle" event does not guarantee content readiness.

Describe the solution you'd like
One solution would be adding a way to pass a hook function which gets called right after opening a web page and before getting content (https://github.com/ScrapeGraphAI/Scrapegraph-ai/blob/main/scrapegraphai/docloaders/chromium.py#L88). If the playwright.Page is passed to this hook, a caller can customize how to determine readiness of the page content.

Describe alternatives you've considered
I am currently trying to workaround this limitation by monkey patching playwright functions.

Additional context
N/A

@VinciGit00
Copy link
Collaborator

hi @moonk-banksalad,
we would be glad if you implement this feature

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