Skip to content

fix: save context state in result for AdaptivePlaywrightCrawler after isolated processing in SubCrawler#1488

Merged
Pijukatel merged 5 commits into
apify:masterfrom
Mantisus:adaptive-playwright-fix
Oct 24, 2025
Merged

fix: save context state in result for AdaptivePlaywrightCrawler after isolated processing in SubCrawler#1488
Pijukatel merged 5 commits into
apify:masterfrom
Mantisus:adaptive-playwright-fix

Conversation

@Mantisus

Copy link
Copy Markdown
Collaborator

Description

  • save context state in result for AdaptivePlaywrightCrawler after isolated processing in SubCrawler

Issues

@Mantisus Mantisus changed the title fixL save context state in result for AdaptivePlaywrightCrawler after isolated processing in SubCrawler fix: save context state in result for AdaptivePlaywrightCrawler after isolated processing in SubCrawler Oct 15, 2025
@Mantisus Mantisus self-assigned this Oct 15, 2025
@Pijukatel

Copy link
Copy Markdown
Collaborator

Please add the test that will cover the reported issue.

@Mantisus

Copy link
Copy Markdown
Collaborator Author

Please add the test that will cover the reported issue.

Added

Comment thread tests/unit/crawlers/_adaptive_playwright/test_adaptive_playwright_crawler.py Outdated
Comment thread tests/unit/crawlers/_adaptive_playwright/test_adaptive_playwright_crawler.py Outdated
Comment thread src/crawlee/crawlers/_adaptive_playwright/_adaptive_playwright_crawler.py Outdated
Comment thread src/crawlee/crawlers/_adaptive_playwright/_adaptive_playwright_crawler.py Outdated
@Mantisus Mantisus requested a review from janbuchar October 23, 2025 00:59

@janbuchar janbuchar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

context.log.debug(f'Detected rendering type {detection_result} for {context.request.url}')
self.rendering_type_predictor.store_result(context.request, detection_result)

self._update_context_from_copy(context, pw_run.run_context)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we should make the changes made to the context part of the RequestHandlerResult data structure at some point. What do you think @Mantisus @Pijukatel?

No need to stall this PR because of that, it can be done later.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Pijukatel Pijukatel merged commit 62b7c70 into apify:master Oct 24, 2025
19 checks passed
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

Successfully merging this pull request may close these issues.

Updating request inside "default_handler", "error_handler" and "failed_request_handler"

4 participants