scrapy-kit
A library for scrapy tools, including but not limited to the usual pipelines, middlewares, etc.
install
pip install scrapy-kit
usage
pipelines
mongo pipeline
A pipeline saved into MongoDB asynchronously with txmongo
use database db.createUser( { user: "username", pwd: "password", roles: [ { role: "readWrite", db: "database" } ] } )
how use:
- add to settings.py
ITEM_PIPELINES = {
'scrapy_kit.pipelines.MongoPipeline': 300,
}
- add mongo config to settings.py
MONGO_URI = "mongodb://username:password@host:port"
MONGO_DATABASE_NAME = "database"
MONGO_COLLECTION_NAME = "collection"
middlewares
proxy connection close middleware
Proxy close connection multiplexing middleware
Tunnel Proxy Dynamic Edition request found that the number of requests in the Personal Centre Tunnel Proxy Usage Statistics is very small, which is seriously inconsistent with the real number of requests. Moreover, there is no IP change when using Tunnel Broker Dynamic Edition. The reason for this is that the tunnel sends requests that reuse previously established connections. You need to add Connection: close to the header.
How to use it:
- Add in settings.py:
DOWNLOADER_MIDDLEWARES = {
'scrapy_kit.middlewares.ProxyConnectionCloseMiddleware': 543,
}
development
git clone
cd scrapy-kit
poetry install
Metadata
Release files for scrapy-kit 0.1.12
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 | Actions |
|---|---|---|---|---|
| scrapy_kit-0.1.12.tar.gz | 11.5 kB | Without provenance | Details for scrapy_kit-0.1.12.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| scrapy_kit-0.1.12-py3-none-any.whl | Python 3 | none | any | Details for scrapy_kit-0.1.12-py3-none-any.whl |
Total release size: 24.1 kB
Release files / scrapy_kit-0.1.12.tar.gz
| Download URL | scrapy_kit-0.1.12.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c48b948a4d7df9e5e5f423c773aba51b74a8306b37d6a6248319364aaac21e4
|
|
BLAKE2b-256 checksum How to use checksums |
092d7c2ee65a59f8be15ebe49510c8dfc20b68cc6779ba29c66950ae243ee45b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.10.12 Linux/6.2.0-1012-azure
|
Release files / scrapy_kit-0.1.12-py3-none-any.whl
| Download URL | scrapy_kit-0.1.12-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
870500546f9e66e64c1901f3348713716e831e6fc7e30881ff600c1585f88ba0
|
|
BLAKE2b-256 checksum How to use checksums |
8f6ba1e22d2d68fc470cdbb8499c5b38cd8fdc2fe46baf4bcf1d7a499705a4d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.10.12 Linux/6.2.0-1012-azure
|
Security for scrapy-kit 0.1.12
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.