An extension that allows a user to display all or some of their scrapy spider settings at runtime.
Project description
Scrapy Settings Log
An extension that allows a user to display all or some of their scrapy spider settings at runtime. It will add a logline with some or all settings for your spider in JSON compatible format.
Install
pip install scrapy-settings-log
Quick-Start
Add the following to your settings:
EXTENSIONS = {
'scrapy_settings_log.SpiderSettingsLogging': 999,
}
SETTINGS_LOGGING_ENABLED = True
When you run your spider you will see a debug log like below when spider is closing:
[scrapy_settings_log.scrapy_settings_log] INFO: {"SETTINGS_LOGGING_ENABLED": true, ...}
Additional Options
SETTINGS_LOGGING_REGEX
- Add a regular expression to only show some settings - for exampleSETTINGS_LOGGING_REGEX = "SPIDERMON"
will show settings with SPIDERMON in their name.SETTINGS_LOGGING_INDENT
- Add indentation to make log more human-readable.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
scrapy-settings-log-1.2.tar.gz
(15.2 kB
view details)
File details
Details for the file scrapy-settings-log-1.2.tar.gz
.
File metadata
- Download URL: scrapy-settings-log-1.2.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 533b630f477bd2c21bb1c36b792d81b1cf1162073b3e2b8dfafe119da6b07a89 |
|
MD5 | 14dd32df7a3149d682e03f4a606cec4d |
|
BLAKE2b-256 | 10d7b00c9f2c19dfbbe49a775301bf1a4f832305e006e51520730032bdb2b4b8 |