fix: Do not share state between different crawlers unless requested by Pijukatel · Pull Request #1669 · apify/crawlee-python

@Pijukatel

@github-actions github-actions bot added t-tooling

Issues with this label are in the ownership of the tooling team.

tested

Temporary label used only programatically for some analytics.

labels

Jan 12, 2026

@Pijukatel

@Pijukatel Pijukatel changed the title Add crawler fix: Do not share state between different crawlers unless requested

Jan 12, 2026

B4nan

@Pijukatel

Only for discussion, types ignored for now.

janbuchar

@Pijukatel

@Pijukatel

janbuchar

@Pijukatel

@Pijukatel

janbuchar

Mantisus pushed a commit to Mantisus/crawlee-python that referenced this pull request

Feb 9, 2026
…pify#1669)

### Description

- Introduces a new argument `id` for `BasicCrawler`. This argument
controls the shared state.
- Each new instance of the `BasicCrawler` gets an automatically
incremented `id` to avoid unintentional sharing of state between
crawlers.
- If two crawlers should use the same state, then it is possible to pass
the same `id` to the crawler `__init__`.

### Issues

Closes: apify#1627

### Testing

- Added tests.