🐞 scrapy-sentry-errors
A simple Scrapy extension that logs spider errors to your Sentry account, helping you monitor and fix issues with your Scrapy spiders efficiently. 🚀
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
🛠️ Installation
pip install city-scrapers-sentry
🏗️ Setup
Add SENTRY_DSN and scrapy_sentry_errors.extensions.Errors extension to your Scrapy project's settings.py file:
Example:
# sentry dsn
SENTRY_DSN = 'http://public:secret@example.com/1'
EXTENSIONS = {
"scrapy_sentry_errors.extensions.Errors": 10,
}
Sentry spider errors will be logged to your Sentry account.
💻 Development
-
Clone this repository.
-
Run the dev setup script and follow the prompts. This will create a virtual environment and a
.envfile with your Sentry DSN:
bash ./scripts/dev_setup.sh
- Simulate a failed spider run using the example Scrapy project in this repo:
pipenv run example
🧪 Testing
Run the tests with:
pipenv run test
📦 Publishing
-
Bump the version number in
pyproject.toml -
Create a new build with:
pipenv run build
- Publish the build to PyPI with:
pipenv run publish
🤝 Contributing
We welcome contributions of all kinds from anyone. Here are some ways you can contribute:
- Reporting Bugs: If you find a bug, please report it by opening an issue. Be sure to provide a detailed description of the bug and, if possible, steps to reproduce it.
- Suggesting Enhancements: Have an idea for a new feature or think something could be improved? Let us know by opening an issue.
- Code Contributions: Feel free to fork the repository and submit pull requests. Whether it's fixing a bug, adding a feature, or improving documentation, your help is welcome.
🙏 Acknowledgements
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.
Metadata
Release files for scrapy-sentry-errors 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| scrapy-sentry-errors-1.0.0.tar.gz | 8.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| scrapy_sentry_errors-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.7 kB
Release files / scrapy-sentry-errors-1.0.0.tar.gz
| Download URL | scrapy-sentry-errors-1.0.0.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f403ab863e0dd026109e416515b479517b6bb59a38b057ca68a45fa5701943f
|
|
BLAKE2b-256 checksum How to use checksums |
9087d4ad848666ea732de7a2c1982c1c30ad4a25b4848e546a96f52866ba4ad3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.18
|
Release files / scrapy_sentry_errors-1.0.0-py3-none-any.whl
| Download URL | scrapy_sentry_errors-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c0f2292b9d3b0d304f63493b2764aa83425b17e0bb62acc2fd242c7e10765f58
|
|
BLAKE2b-256 checksum How to use checksums |
f0dc8dbfa879e528968eaeb1a31ed0de91ba8975df255a4c32e4715a0d49d75a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.18
|
Security for scrapy-sentry-errors 1.0.0
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.