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 jiuqian-scrapy-pipelines

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 = {
    "jiuqian_scrapy_pipelines.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', 'spider'])

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.2.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.2-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scrapy_pipeline_all-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 eb8ad2e9556265b769ecce2a22283b0d5a15e00b1a0cbd8d2bfc5d55883da4da
MD5 363f39343c0bfb1ee0d3f29e38653445
BLAKE2b-256 b99f70e28753d0972283fe383e38c6c340e3381b4e03c27cce2252c996aefde2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scrapy_pipeline_all-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.7 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e70e1f171b23b157c680b2e6c2403c9a828716783a9becc66ea5d33c6d0363cc
MD5 5323a5c859c4563965f8610abff942a9
BLAKE2b-256 368e62e109ea62ffa1ecdba561652ba289272eb5c1e431b97c4afd3c6ac52c3b

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.3

2 files

This release

0.1.2 This release

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