Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

city-scrapers-sentry

A Scrapy extension that logs spider errors to Sentry.

This project began as a fork of scrapy-sentry, which was developed by Jordi Llonch. We are grateful for his work and those of other contributors.

Note: while this extension captures errors from Scrapy spiders, it does not capture errors elsewhere in Scrapy's operation (e.g. the Scrapy pipeline).

Requirements:

  • A Sentry account.
  • The DSN for your Sentry project.

Installation

pip install city-scrapers-sentry

Setup

Add SENTRY_DSN and city_scrapers_sentry.extensions.Errors extension to your Scrapy project's settings.py file:

Example:

# sentry dsn
SENTRY_DSN = 'http://public:secret@example.com/1'
EXTENSIONS = {
    "city_scrapers_sentry.extensions.Errors": 10,
}

Development

  1. Install pipenv if you don't have it already.

  2. At the project root, create a .env file and include the following. Replace <your-sentry-dsn> with your Sentry DSN:

SENTRY_DSN=<your-sentry-dsn>
  1. Run the following command from the project root to activate pipenv's virtual environment and install project dependencies:
pipenv sync --dev

When activated, pipenv should load your SENTRY_DSN env var from the .env file.

  1. Enter the example_project directory:
cd example_project
  1. Simulate a failed spider run. The spider will log an error to your Sentry account:
scrapy crawl example

Metadata

Release files for city-scrapers-sentry 1.0.0b1

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

Source distribution (sdist)

Source distribution for city-scrapers-sentry 1.0.0b1
File Size Uploaded Provenance
city-scrapers-sentry-1.0.0b1.tar.gz 7.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for city-scrapers-sentry 1.0.0b1
File Interpreter ABI Platform
city_scrapers_sentry-1.0.0b1-py3-none-any.whl Python 3 none any Details

Total release size: 11.5 kB

Release files / city-scrapers-sentry-1.0.0b1.tar.gz

Download URL city-scrapers-sentry-1.0.0b1.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
25c0148fd53c4ea1d5f40b2d3059fe9cb90015418ac74836a177c89d6e3158ec
BLAKE2b-256 checksum
How to use checksums
12d6fabbd37e3ed6b890efc7ea8bdad638115a611913e45af643f8908a6c5506
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / city_scrapers_sentry-1.0.0b1-py3-none-any.whl

Download URL city_scrapers_sentry-1.0.0b1-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a83a63e9b01a4f8acb9be0ff8da5199874b3d317e7482b02e6335b3222b0d1e1
BLAKE2b-256 checksum
How to use checksums
d39e151dc48211019cdfa99a1ce6ebca02bd29d68ac340baccc98916ddda4704
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Security for city-scrapers-sentry 1.0.0b1

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