Skip to main content

jiuqian-scrapy-pipelines

Reusable Scrapy pipeline for counting items and sending a completion message to a WeCom bot.

Install

pip install scrapy-pipeline-all

Configure

Set the WeCom bot webhook:

WECHAT_WORK_WEBHOOK=https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=...

Register the pipeline in Scrapy settings:

ITEM_PIPELINES = {
  "scrapy-pipeline-all.pipelines.ItemCountWeComPipeline":400,
}

create main.py

crate .env file

WECHAT_WORK_WEBHOOK=https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=...
from scrapy.cmdline import execute
import os
from pathlib import Path
from dotenv import load_dotenv
# settings.py 的上一级目录是包目录,再上一级是项目根目录
BASE_DIR = Path(__file__).resolve().parent
load_dotenv(BASE_DIR / ".env")
dirpath = os.path.dirname(os.path.abspath(__file__))
os.chdir(dirpath)
execute(['scrapy', 'crawl', 'aaa'])

Download files

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

Source Distribution

scrapy_pipeline_all-0.1.3.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

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

scrapy_pipeline_all-0.1.3-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file scrapy_pipeline_all-0.1.3.tar.gz.

File metadata

  • Download URL: scrapy_pipeline_all-0.1.3.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for scrapy_pipeline_all-0.1.3.tar.gz
Algorithm Hash digest
SHA256 2a2ba7d06703fded76f7b79b3e5311d2f93e3f3e6fd24bf0d498df4cb9c8e423
MD5 179c0b4965cdf6a7befd1677158a248f
BLAKE2b-256 6c3e151fdf3a484e670bdfa99761cb75fe5ad13be8571987de8827322f1b6d24

See more details on using hashes here.

File details

Details for the file scrapy_pipeline_all-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: scrapy_pipeline_all-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for scrapy_pipeline_all-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6560c2adf5bb818c20d3435b16b7b3cac1288eebc2e298c07c4810fac338b54f
MD5 e44a15e6241ab1ce2e81dc0205b1b7ad
BLAKE2b-256 96ed3d1b4af2170979b112cb7b58973d751b1a022797d42e17216ea2290bad82

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 files

0.1.2

2 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