Skip to main content

No project description provided

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spider_brew_kit-0.1.6.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spider_brew_kit-0.1.6-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file spider_brew_kit-0.1.6.tar.gz.

File metadata

  • Download URL: spider_brew_kit-0.1.6.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.2.0-1019-azure

File hashes

Hashes for spider_brew_kit-0.1.6.tar.gz
Algorithm Hash digest
SHA256 a04c473e82b93df973fa9c7f64f7dd5f7c77dc477eae89afb560f450bf8c5a3b
MD5 0278b4fe8e1711b845b9c840cd149917
BLAKE2b-256 301dfb8b6f340a4ea21cf8e1004aacee20e4d2ef50fb9c9ec215cf95979cafe1

See more details on using hashes here.

File details

Details for the file spider_brew_kit-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: spider_brew_kit-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.2.0-1019-azure

File hashes

Hashes for spider_brew_kit-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ca0fb973348b35c104b5c45875730fe1fa5565ad31b8a1534c201ecdb4647026
MD5 ae446f162f306c0a7352517c0b875fca
BLAKE2b-256 fed8bc8b17f5995b386aa44de21dac4827f9ed83a010ac4af90fd27cebb6199a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page