feat: Add HTTP and Adaptive crawler templates#1888
Draft
Conversation
Add `http`, `adaptive-beautifulsoup`, and `adaptive-parsel` to the cookiecutter project template (`crawlee create`), plus matching markers, parametrization in the e2e templates tests, and entries in the scheduled-tests CI matrix so the new types get the same coverage as existing ones.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1888 +/- ##
==========================================
+ Coverage 92.69% 92.73% +0.04%
==========================================
Files 161 161
Lines 11356 11356
==========================================
+ Hits 10526 10531 +5
+ Misses 830 825 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds the missing crawler types to the cookiecutter project template (
crawlee create) and the scheduled E2E templates tests:http— usesHttpCrawler(no HTML parser, raw bytes).adaptive-beautifulsoup— usesAdaptivePlaywrightCrawler.with_beautifulsoup_static_parser().adaptive-parsel— usesAdaptivePlaywrightCrawler.with_parsel_static_parser().Each has its own
main_*.pyandroutes_*.pytemplate files in the same shape as the existing static-parser templates. Cookiecutterextrasresolution and Docker base-image selection were extended; theFROMif-ladder in the Dockerfile was refactored into a singleset base_imageblock, and the http-client extra logic was collapsed into one branch.The e2e templates test (
tests/e2e/project_template/test_static_crawlers_templates.py) and the scheduled-tests matrix (.github/workflows/on_schedule_tests.yaml) were extended with the three new crawler types and matching pytest markers, so they get the same coverage as existing types.Issues
Notes
beautifulsoupandparselextras regardless of the chosen parser, becauseAdaptivePlaywrightCrawlerimports bothbs4andparselat module load time. The upstreamadaptive-crawlerextra inpyproject.tomldoes not declare these — fixing that is tracked separately.cookiecutter.json,tests/e2e/conftest.py, the test parametrize block, and the CI matrix into a single source of truth is tracked in a separate proposal (not part of this PR).