Skip to main content

spider-brew-kit

A library for scrapy tools, including but not limited to the usual pipelines, middlewares, etc.

install

pip install spider-brew-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 spider-brew-kit
poetry install

Metadata

Release files for spider-brew-kit 0.1.6

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

Source distribution (sdist)

Source distribution for spider-brew-kit 0.1.6
File Size Uploaded
spider_brew_kit-0.1.6.tar.gz 12.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for spider-brew-kit 0.1.6
File Interpreter ABI Platform
spider_brew_kit-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 26.3 kB

Release files / spider_brew_kit-0.1.6.tar.gz

Download URL spider_brew_kit-0.1.6.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a04c473e82b93df973fa9c7f64f7dd5f7c77dc477eae89afb560f450bf8c5a3b
BLAKE2b-256 checksum
How to use checksums
301dfb8b6f340a4ea21cf8e1004aacee20e4d2ef50fb9c9ec215cf95979cafe1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.12 Linux/6.2.0-1019-azure

Release files / spider_brew_kit-0.1.6-py3-none-any.whl

Download URL spider_brew_kit-0.1.6-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ca0fb973348b35c104b5c45875730fe1fa5565ad31b8a1534c201ecdb4647026
BLAKE2b-256 checksum
How to use checksums
fed8bc8b17f5995b386aa44de21dac4827f9ed83a010ac4af90fd27cebb6199a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.12 Linux/6.2.0-1019-azure

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

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