You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Javascript version, the error handler is able to access the Page object via PlaywrightCrawlingContext.page. I discovered that the Python version doesn't implement this when porting the ContextPipeline to Javascript.
changing this in the adaptive playwright crawler will be especially tricky
Add some "deferred cleanup" step to the context pipeline and call that after error handlers are done
it's unclear how this would fit in the current async generator based middleware model
considerable refactoring of the _run_request_handler and __run_task_function would still be necessary - error handlers are called by the latter and context pipeline is only handled in the former
Activity
janbuchar commentedon Dec 4, 2025
In JS, we went with the second approach - we added
registerDeferredCleanupand use it like thisfix: Defer page object cleanup to make it accessible in error handlers (