Skip to main content

scrapy-itemlimit

Reusable Scrapy middleware for per-target item limiting during pagination crawls.

Installation

pip install scrapy-itemlimit

Included Middleware

PerTargetItemLimitSpiderMiddleware

Stops further item output for a target key after the configured limit is reached.

Supported settings:

  • PER_TARGET_ITEM_LIMIT (int)
  • TARGET_META_KEY (str, default: brand_token)

Scrapy Settings Example

SPIDER_MIDDLEWARES = {
	"scrapy_itemlimit.middlewares.PerTargetItemLimitSpiderMiddleware": 543,
}

PER_TARGET_ITEM_LIMIT = 100
TARGET_META_KEY = "brand_token"

Development Install

pip install -e .

Build and Publish to PyPI

  1. Bump version in both:
    • setup.py
    • scrapy_itemlimit/__init__.py
  2. Build package:
python -m pip install --upgrade build twine
python -m build
  1. Validate artifacts:
python -m twine check dist/*
  1. Upload:
python -m twine upload dist/*

Optional (recommended first): TestPyPI

python -m twine upload --repository testpypi dist/*

Version

Current package version: 0.2.4

Metadata

Release files for scrapy-itemlimit 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scrapy-itemlimit 0.2.4
File Size Uploaded Provenance Actions
scrapy_itemlimit-0.2.4.tar.gz 2.8 kB Without provenance Details for scrapy_itemlimit-0.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scrapy-itemlimit 0.2.4
File Interpreter ABI Platform Actions
scrapy_itemlimit-0.2.4-py3-none-any.whl Python 3 none any Details for scrapy_itemlimit-0.2.4-py3-none-any.whl

Total release size: 5.9 kB

Release files / scrapy_itemlimit-0.2.4.tar.gz

Download URL scrapy_itemlimit-0.2.4.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a8d162b65a3b387711c771165dbf9aed0443dfb7a3f6d23c176cf75a2e69fcf8
BLAKE2b-256 checksum
How to use checksums
8a05c8e48afb932ba5102a37768ac5a54c51561cbd1b624d8732407667b939d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / scrapy_itemlimit-0.2.4-py3-none-any.whl

Download URL scrapy_itemlimit-0.2.4-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c6820be462432e2df7824bc169295d0d9b1001b25256fcbc152ff5342b3dd73a
BLAKE2b-256 checksum
How to use checksums
7fb6b3d89974dfa730c20c76c68e715208a0eee741e09719b0245dc7bbc3a80d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for scrapy-itemlimit 0.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page