Skip to content

docs: Add Scrapling guide#938

Open
vdusek wants to merge 6 commits into
masterfrom
docs/scrapling-guide
Open

docs: Add Scrapling guide#938
vdusek wants to merge 6 commits into
masterfrom
docs/scrapling-guide

Conversation

@vdusek
Copy link
Copy Markdown
Contributor

@vdusek vdusek commented Jun 5, 2026

Adds a guide for the Scrapling adaptive web scraping library in Apify Actors, following the structure of the existing scraping-library guides.

  • docs/03_guides/07_scrapling.mdx — the guide: introduction & features, choosing a fetcher (HTTP vs. browser-based), a runnable example Actor, Apify Proxy integration, and running browser fetchers (DynamicFetcher/StealthyFetcher) with the required scrapling install step in the Dockerfile.
  • code/07_scrapling.py — runnable single-file example: a recursive title scraper using Scrapling's async HTTP AsyncFetcher through Apify Proxy. code/07_scrapling_browser.py shows the browser-based variant.
  • Quick-start guides list updated.

Verified locally (apify run) and on the Apify platform (build + run SUCCEEDED, correct dataset output via Apify Proxy), including the browser path. Lint + type-check pass.

Closes: #836

TODO before merging

  • Clone the guide content (docs/03_guides/07_scrapling.mdx + docs/03_guides/code/07_scrapling.py + docs/03_guides/code/07_scrapling_browser.py) into website/versioned_docs/version-3.4/ so it also shows in the current docs version, not only under "next".

@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Jun 5, 2026
@vdusek vdusek self-assigned this Jun 5, 2026
@github-actions github-actions Bot added this to the 142nd sprint - Tooling team milestone Jun 5, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.95%. Comparing base (24a6edb) to head (55ad62a).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #938   +/-   ##
=======================================
  Coverage   86.94%   86.95%           
=======================================
  Files          48       48           
  Lines        2942     2943    +1     
=======================================
+ Hits         2558     2559    +1     
  Misses        384      384           
Flag Coverage Δ
e2e ?
integration 59.08% <ø> (+0.18%) ⬆️
unit 75.70% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek vdusek marked this pull request as ready for review June 5, 2026 09:54
@vdusek vdusek requested a review from szaganek as a code owner June 5, 2026 09:54
@vdusek vdusek requested a review from Mantisus June 5, 2026 09:54
Copy link
Copy Markdown
Collaborator

@Mantisus Mantisus left a comment

Choose a reason for hiding this comment

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

A couple of questions that might change the guide

) -> tuple[dict[str, Any], list[str]]:
"""Fetch a page in a real browser with Scrapling and return data and links."""
# `network_idle` waits until the page stops making network requests.
response = await DynamicFetcher.async_fetch(
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.

How does this work internally? Does the browser open, send a request, and then close? If so, it looks like an overhead for a guide example.

) -> tuple[dict[str, Any], list[str]]:
"""Fetch a page with Scrapling's HTTP fetcher and return data and links."""
# `impersonate` and `stealthy_headers` make the request look like Chrome.
response = await AsyncFetcher.get(
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.

The guide is titled 'Adaptive Scraping with Scrapling'. Should we use the 'adaptive=True' mode in the example? 🙂

https://scrapling.readthedocs.io/en/latest/parsing/adaptive.html

{ScraplingBrowserScraper}
</CodeBlock>

To run this on the Apify platform, build on top of the [Apify Playwright base image](https://hub.docker.com/r/apify/actor-python-playwright), which already ships a browser together with all of its system-level dependencies, and run `scrapling install` during the Docker build to download the browser binaries that Scrapling expects.
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.

We can add a simple Dockerfile example here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add documentation guides for LLM-based web scraping frameworks

3 participants