Skip to main content

tkitScrapyMongoPipeline

MongoPipeline

https://docs.scrapy.org/en/latest/topics/item-pipeline.html

数据存储到mongodb

# settings
import tkitScrapyMongoPipeline
# 1、设置MongoDB 的数据库地址
MONGO_URI = "mongodb://192.168.123.117:27017/"
MONGO_DATABASE="test"
# # 2、启用中间件MongoPipeline
ITEM_PIPELINES = {
   # 'base.pipelines.DuplicatesPipeline': 100,
   'base.pipelines.MongoPipeline': 100,
}








# item 字段示例
 item={
#设置强制去重复字段
"unique_id":url,
"title": title, "url": url, "content": text, "site": "playbarkrun.com", "content_type": "content",
# 设置表名
"collection_name":"test11"
}

详细参考

dev.md

Metadata

Release files for tkitScrapyMongoPipeline 0.0.0.116522771

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

Source distribution (sdist)

Source distribution for tkitScrapyMongoPipeline 0.0.0.116522771
File Size Uploaded Provenance Actions
tkitScrapyMongoPipeline-0.0.0.116522771.tar.gz 7.4 kB Without provenance Details for tkitScrapyMongoPipeline-0.0.0.116522771.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tkitScrapyMongoPipeline 0.0.0.116522771
File Interpreter ABI Platform Actions
tkitScrapyMongoPipeline-0.0.0.116522771-py2.py3-none-any.whl Python 3, Python 2 none any Details for tkitScrapyMongoPipeline-0.0.0.116522771-py2.py3-none-any.whl

Total release size: 15.2 kB

Release files / tkitScrapyMongoPipeline-0.0.0.116522771.tar.gz

Download URL tkitScrapyMongoPipeline-0.0.0.116522771.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
636e680a66e6c8c918c4bf92aa696d502eea6549e63c09cb0a0050fe48868845
BLAKE2b-256 checksum
How to use checksums
286e8af1139d78732ad1140b67d8e635240c387ddad72120889f3b9ddb3be72c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.7.13

Release files / tkitScrapyMongoPipeline-0.0.0.116522771-py2.py3-none-any.whl

Download URL tkitScrapyMongoPipeline-0.0.0.116522771-py2.py3-none-any.whl
Size 7.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
85f4d08d7070374fda6a8e3edc264d8671e8abc61078ce4fb046747b468a9e87
BLAKE2b-256 checksum
How to use checksums
87ea2d4966b6a59a7670ddee701c2cc94e2b1cfea58cdd5c8f4a6f1d33de0400
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.7.13

Security for tkitScrapyMongoPipeline 0.0.0.116522771

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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