Skip to main content

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:

  1. add to settings.py
ITEM_PIPELINES = {
    'scrapy_kit.pipelines.MongoPipeline': 300,
}
  1. 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:

  1. 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)

Source distribution for scrapy-kit 0.1.12
File Size Uploaded
scrapy_kit-0.1.12.tar.gz 11.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for scrapy-kit 0.1.12
File Interpreter ABI Platform
scrapy_kit-0.1.12-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.1.12 This release

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.3

2 release files

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