Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ quote_type = single
[Makefile]
indent_style = tab

[{*.yaml, *.yml}]
[{*.yaml,*.yml}]
indent_size = 2
quote_type = double
2 changes: 1 addition & 1 deletion .github/workflows/manual_release_beta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: apify/actions/wait-for-checks@v1.6.2
with:
ref: ${{ github.sha }}
check-regexp: '^Checks'
check-regexp: ^Checks

release_prepare:
name: Release prepare
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual_release_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
uses: apify/actions/wait-for-checks@v1.6.2
with:
ref: ${{ github.sha }}
check-regexp: '^Checks'
check-regexp: ^Checks

- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual_release_stable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
uses: apify/actions/wait-for-checks@v1.6.2
with:
ref: ${{ github.sha }}
check-regexp: '^Checks'
check-regexp: ^Checks

release_prepare:
name: Release prepare
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/manual_version_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
uses: apify/actions/wait-for-checks@v1.6.2
with:
ref: ${{ github.sha }}
check-regexp: '^Checks'
check-regexp: ^Checks

- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down Expand Up @@ -126,6 +126,6 @@ jobs:
uses: apify/actions/signed-commit@v1.6.2
with:
message: "docs: Version docs for v${{ steps.snapshot.outputs.version }} [skip ci]"
add: 'website/versioned_docs website/versioned_sidebars website/versions.json'
pull: '--rebase --autostash'
add: website/versioned_docs website/versioned_sidebars website/versions.json
pull: --rebase --autostash
github-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
18 changes: 9 additions & 9 deletions .github/workflows/on_schedule_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ on:
workflow_dispatch:
inputs:
slack_test:
description: 'Skip the tests and only send a Slack notification, to check the alerting path.'
description: Skip the tests and only send a Slack notification, to check the alerting path.
type: boolean
default: false

# Runs on weekdays at 01:00 UTC.
schedule:
- cron: '0 1 * * 1-5'
- cron: 0 1 * * 1-5

# Runs on pull requests that touch the template files, the template e2e tests,
# or this workflow itself, so that changes affecting the scheduled tests are
# validated before they are merged.
pull_request:
paths:
- 'src/crawlee/project_template/**'
- 'tests/e2e/**'
- '.github/workflows/on_schedule_tests.yaml'
- src/crawlee/project_template/**
- tests/e2e/**
- .github/workflows/on_schedule_tests.yaml

concurrency:
group: scheduled-tests
Expand All @@ -42,11 +42,11 @@ jobs:
fail-fast: false
max-parallel: 12
matrix:
crawler-type: ["playwright_camoufox", "playwright_chrome", "playwright_firefox", "playwright_webkit", "playwright", "parsel", "beautifulsoup", "adaptive_beautifulsoup", "adaptive_parsel", "stagehand"]
http-client: ["httpx", "curl_impersonate", "impit"]
package-manager: ["pip", "uv", "poetry"]
crawler-type: [playwright_camoufox, playwright_chrome, playwright_firefox, playwright_webkit, playwright, parsel, beautifulsoup, adaptive_beautifulsoup, adaptive_parsel, stagehand]
http-client: [httpx, curl_impersonate, impit]
package-manager: [pip, uv, poetry]

runs-on: "ubuntu-latest"
runs-on: ubuntu-latest

steps:
- name: Checkout repository
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/update_playwright_version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

# Runs every workday (Monday to Friday) at 04:00 UTC.
schedule:
- cron: '0 4 * * 1-5'
- cron: 0 4 * * 1-5

concurrency:
group: update-playwright-version
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.14'
python-version: "3.14"

- name: Update Playwright version
run: python scripts/update_playwright_version.py
Expand All @@ -62,10 +62,10 @@ jobs:
if: steps.changes.outputs.has-changes == 'true'
uses: apify/actions/signed-commit@v1.6.2
with:
message: 'chore: update Playwright version in project template'
message: "chore: update Playwright version in project template"
github-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
branch: ${{ env.BRANCH_NAME }}
create-branch: 'true'
create-branch: "true"

- name: Create or update Pull Request
if: steps.commit-and-push.outputs.committed == 'true'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/update_public_suffix_list.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

# Runs every workday (Monday to Friday) at 04:00 UTC.
schedule:
- cron: '0 4 * * 1-5'
- cron: 0 4 * * 1-5

concurrency:
group: update-public-suffix-list
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.14'
python-version: "3.14"

- name: Update Public Suffix List
run: python scripts/update_public_suffix_list.py
Expand All @@ -62,10 +62,10 @@ jobs:
if: steps.changes.outputs.has-changes == 'true'
uses: apify/actions/signed-commit@v1.6.2
with:
message: 'chore: update Public Suffix List snapshot'
message: "chore: update Public Suffix List snapshot"
github-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
branch: ${{ env.BRANCH_NAME }}
create-branch: 'true'
create-branch: "true"

- name: Create or update Pull Request
if: steps.commit-and-push.outputs.committed == 'true'
Expand Down
6 changes: 3 additions & 3 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ line-length: false
ul-style:
style: dash

# Nested unordered lists use 4-space indentation.
ul-indent:
indent: 4
# Code blocks are fenced, never indented.
code-block-style:
style: fenced

# Docs are MDX and embed JSX components.
no-inline-html: false
Expand Down
12 changes: 6 additions & 6 deletions .rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ Note: `uv run poe unit-tests` first runs tests marked `@pytest.mark.run_alone` i
- **Type checker**: ty (Astral's type checker), target Python 3.10
- **Async mode**: pytest-asyncio in `auto` mode (no need for `@pytest.mark.asyncio`)
- **Commits**: [Conventional Commits](https://www.conventionalcommits.org/) format. Choose the type based on *what* changed, not just *why*:
- `feat:` / `fix:` / `perf:` / `refactor:` / `style:` — **source code only**; these trigger a release and appear in the changelog
- `test:` — test additions or changes (no release triggered)
- `docs:` — documentation changes; also triggers a doc release on master
- `ci:` — CI/workflow changes
- `chore:` — dependency bumps, tooling, and other housekeeping
- `build:` — build system changes
- `feat:` / `fix:` / `perf:` / `refactor:` / `style:` — **source code only**; these trigger a release and appear in the changelog
- `test:` — test additions or changes (no release triggered)
- `docs:` — documentation changes; also triggers a doc release on master
- `ci:` — CI/workflow changes
- `chore:` — dependency bumps, tooling, and other housekeeping
- `build:` — build system changes

## Architecture

Expand Down
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ uv run poe run-docs

Markdown content (this guide, `README.md`, and the `docs/` folder) is checked with
[markdownlint](https://github.com/DavidAnson/markdownlint). The Docusaurus website code is linted
with [oxlint](https://oxc.rs/) and formatted with [oxfmt](https://oxc.rs/). All of them run in CI.
with [oxlint](https://oxc.rs/) in type-aware mode (types come from `website/tsconfig.json`) and
formatted with [oxfmt](https://oxc.rs/). All of them run in CI.
To run them locally (requires Node.js 22.12 or newer and pnpm), from the `website/` directory:

```sh
Expand Down
10 changes: 5 additions & 5 deletions docs/upgrading/upgrading_to_v0x.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,19 @@ Example update:

- The `request_provider` parameter of `BasicCrawler.__init__` has been renamed to `request_manager`
- The `BasicCrawler.get_request_provider` method has been renamed to `BasicCrawler.get_request_manager` and it does not accept the `id` and `name` arguments anymore
- If using a specific request queue is desired, pass it as the `request_manager` on `BasicCrawler` creation
- If using a specific request queue is desired, pass it as the `request_manager` on `BasicCrawler` creation
- The `RequestProvider` interface has been renamed to `RequestManager` and moved to the `crawlee.request_loaders` package
- `RequestList` has been moved to the `crawlee.request_loaders` package
- `RequestList` does not support `.drop()`, `.reclaim_request()`, `.add_request()` and `add_requests_batched()` anymore
- It implements the new `RequestLoader` interface instead of `RequestManager`
- `RequestManagerTandem` with a `RequestQueue` should be used to enable passing a `RequestList` (or any other `RequestLoader` implementation) as a `request_manager`, `await list.to_tandem()` can be used as a shortcut
- It implements the new `RequestLoader` interface instead of `RequestManager`
- `RequestManagerTandem` with a `RequestQueue` should be used to enable passing a `RequestList` (or any other `RequestLoader` implementation) as a `request_manager`, `await list.to_tandem()` can be used as a shortcut

### PlaywrightCrawler

- The `PlaywrightPreNavigationContext` was renamed to `PlaywrightPreNavCrawlingContext`.
- The input arguments in `PlaywrightCrawler.__init__` have been renamed:
- `browser_options` is now `browser_launch_options`,
- `page_options` is now `browser_new_context_options`.
- `browser_options` is now `browser_launch_options`,
- `page_options` is now `browser_new_context_options`.
- These argument renaming changes have also been applied to `BrowserPool`, `PlaywrightBrowserPlugin`, and `PlaywrightBrowserController`.

## Upgrading to v0.4
Expand Down
4 changes: 0 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -384,10 +384,6 @@ uv run pytest \
tests/e2e/project_template
"""

[tool.poe.tasks.update-docs-theme]
shell = "pnpm update @apify/docs-theme"
cwd = "website"

[tool.poe.tasks.build-docs]
shell = "./build_api_reference.sh && pnpm install && uv run pnpm build"
cwd = "website"
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Here are some suggested approaches to mitigate flakiness, sorted in the order of

- Investigate the root cause and fix the code or test.
- Apply one of the pytest marks to mitigate the flakiness:
- `@run_alone_on_mac` - Test with such mark will run alone on macOS exeutor in CI (normally several tests run in parallel, which can cause resource-sensitive tests to fail.) Use for resource sensitive tests that are known to be flaky only on macOS.
- `@run_alone` - Test with such mark will run alone on any executor. Use for resource sensitive tests that are known to be flaky on all platforms or for tests that can not be run in parallel with other test due to their design (This should be extremely rare).
- `@pytest.mark.flaky` - Test with such mark will be retried several times if it fails. Use for tests that are known to be flaky, but the reason for flakiness is not understood or can not be easily mitigated.
- `@pytest.mark.skip` - Test with such mark will be skipped. Use when none of the above approaches mitigate the test flakiness. Marking test as skipped should be a last resort, as it can hide potential bugs and give false sense of security. Skipped tests should be tracked in GitHub issue.
- `@run_alone_on_mac` - Test with such mark will run alone on macOS exeutor in CI (normally several tests run in parallel, which can cause resource-sensitive tests to fail.) Use for resource sensitive tests that are known to be flaky only on macOS.
- `@run_alone` - Test with such mark will run alone on any executor. Use for resource sensitive tests that are known to be flaky on all platforms or for tests that can not be run in parallel with other test due to their design (This should be extremely rare).
- `@pytest.mark.flaky` - Test with such mark will be retried several times if it fails. Use for tests that are known to be flaky, but the reason for flakiness is not understood or can not be easily mitigated.
- `@pytest.mark.skip` - Test with such mark will be skipped. Use when none of the above approaches mitigate the test flakiness. Marking test as skipped should be a last resort, as it can hide potential bugs and give false sense of security. Skipped tests should be tracked in GitHub issue.
File renamed without changes.
65 changes: 26 additions & 39 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"private": true,
"scripts": {
"examples": "docusaurus-examples",
"postinstall": "pnpm exec patch-package",
"start": "rimraf .docusaurus && docusaurus start",
"start:fast": "rimraf .docusaurus && CRAWLEE_DOCS_FAST=1 docusaurus start",
"build": "rimraf .docusaurus && node --max_old_space_size=16000 node_modules/@docusaurus/core/bin/docusaurus.mjs build",
Expand All @@ -19,58 +18,46 @@
"lint:fix": "pnpm lint:md:fix && pnpm lint:code:fix",
"lint:md": "cd .. && markdownlint --config .markdownlint.yaml \"**/*.{md,mdx}\" --ignore-path .gitignore --ignore website/versioned_docs --ignore website/versioned_sidebars --ignore CHANGELOG.md --ignore docs/changelog.md --ignore \"src/**/project_template/**\"",
"lint:md:fix": "cd .. && markdownlint --fix --config .markdownlint.yaml \"**/*.{md,mdx}\" --ignore-path .gitignore --ignore website/versioned_docs --ignore website/versioned_sidebars --ignore CHANGELOG.md --ignore docs/changelog.md --ignore \"src/**/project_template/**\"",
"lint:code": "oxlint",
"lint:code:fix": "oxlint --fix",
"lint:code": "oxlint --type-aware --deny-warnings",
"lint:code:fix": "oxlint --type-aware --fix",
"format": "oxfmt",
"format:check": "oxfmt --check",
"opt:images": "pnx --config.onlyBuiltDependencies=* @343dev/optimizt --webp",
"preinstall": "npx only-allow pnpm"
},
"dependencies": {
"@apify/docusaurus-plugin-typedoc-api": "^5.1.7",
"@apify/utilities": "^3.0.0",
"@docusaurus/core": "^3.9.2",
"@docusaurus/faster": "^3.9.2",
"@docusaurus/mdx-loader": "^3.9.2",
"@docusaurus/plugin-client-redirects": "^3.9.2",
"@docusaurus/preset-classic": "^3.9.2",
"@docusaurus/theme-mermaid": "^3.9.2",
"@giscus/react": "^3.0.0",
"@mdx-js/react": "^3.0.1",
"@mermaid-js/layout-elk": "^1.0.0",
"@signalwire/docusaurus-plugin-llms-txt": "^1.2.1",
"axios": "^1.5.0",
"buffer": "^6.0.3",
"clsx": "^2.0.0",
"crypto-browserify": "^3.12.0",
"@apify/docusaurus-plugin-typedoc-api": "^5.1.16",
"@docusaurus/core": "^3.10.2",
"@docusaurus/faster": "^3.10.2",
"@docusaurus/plugin-client-redirects": "^3.10.2",
"@docusaurus/preset-classic": "^3.10.2",
"@docusaurus/theme-mermaid": "^3.10.2",
"@giscus/react": "^3.1.0",
"@mdx-js/react": "^3.1.1",
"@signalwire/docusaurus-plugin-llms-txt": "^1.2.2",
"clsx": "^2.1.1",
"docusaurus-gtm-plugin": "^0.0.2",
"prism-react-renderer": "^2.1.0",
"process": "^0.11.10",
"prop-types": "^15.8.1",
"prism-react-renderer": "^2.4.1",
"raw-loader": "^4.0.2",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react": "^19.3.0",
"react-dom": "^19.3.0",
"react-github-btn": "^1.4.0",
"react-lite-youtube-embed": "^3.0.0",
"stream-browserify": "^3.0.0",
"unist-util-visit": "^5.0.0"
"unist-util-visit": "^5.1.0"
},
"devDependencies": {
"@apify/oxlint-config": "^0.3.0",
"@apify/tsconfig": "^0.2.0",
"@apify/ui-icons": "^1.23.0",
"@docusaurus/module-type-aliases": "^3.9.2",
"@docusaurus/types": "^3.9.2",
"@types/react": "^19.0.0",
"fs-extra": "^11.1.0",
"markdownlint": "^0.41.0",
"markdownlint-cli": "^0.49.0",
"@apify/ui-icons": "^1.54.0",
"@docusaurus/module-type-aliases": "^3.10.2",
"@docusaurus/types": "^3.10.2",
"@types/react": "^19.3.0",
"markdownlint": "^0.41.1",
"markdownlint-cli": "^0.49.1",
"oxfmt": "^0.72.0",
"oxlint": "^1.73.0",
"patch-package": "^8.0.0",
"path-browserify": "^1.0.1",
"rimraf": "^6.0.0",
"typescript": "^6.0.0"
"oxlint": "^1.87.0",
"oxlint-tsgolint": "^7.0.2004",
"rimraf": "^6.1.3",
"typescript": "^6.0.3"
},
"packageManager": "pnpm@12.11.2"
}
19 changes: 0 additions & 19 deletions website/patches/@docusaurus+core+3.5.2.patch

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/node_modules/@docusaurus/core/lib/client/ClientLifecyclesDispatcher.js b/node_modules/@docusaurus/core/lib/client/ClientLifecyclesDispatcher.js
index 903f8dc..b6b60bf 100644
--- a/node_modules/@docusaurus/core/lib/client/ClientLifecyclesDispatcher.js
+++ b/node_modules/@docusaurus/core/lib/client/ClientLifecyclesDispatcher.js
diff --git a/lib/client/ClientLifecyclesDispatcher.js b/lib/client/ClientLifecyclesDispatcher.js
index 903f8dc30b2e044fd5e1cb868ac5698b13186292..b6b60bfa5237af5d5598e3e2051760da00321159 100644
--- a/lib/client/ClientLifecyclesDispatcher.js
+++ b/lib/client/ClientLifecyclesDispatcher.js
@@ -30,9 +30,11 @@ function scrollAfterNavigation({ location, previousLocation, }) {
window.scrollTo(0, 0);
}
Expand Down
13 changes: 0 additions & 13 deletions website/patches/@signalwire+docusaurus-plugin-llms-txt+1.2.2.patch

This file was deleted.

Loading
Loading