tkitScrapyMongoPipeline
MongoPipeline
https://docs.scrapy.org/en/latest/topics/item-pipeline.html
数据存储到mongodb
# settings
# 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={
#设置强制去重复字段
"dup_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.116515135
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tkitScrapyMongoPipeline-0.0.0.116515135.tar.gz | 7.4 kB | Without provenance | Details for tkitScrapyMongoPipeline-0.0.0.116515135.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tkitScrapyMongoPipeline-0.0.0.116515135-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for tkitScrapyMongoPipeline-0.0.0.116515135-py2.py3-none-any.whl |
Total release size: 15.0 kB
Release files / tkitScrapyMongoPipeline-0.0.0.116515135.tar.gz
| Download URL | tkitScrapyMongoPipeline-0.0.0.116515135.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ade996c5762e4915027875ad372a016ac76b4d12397761581500b3c03df7954
|
|
BLAKE2b-256 checksum How to use checksums |
3bbc981a058c6debd545bc8676ffa83d85a59118e4d6d967915bd8bf151e523c
|
| 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.116515135-py2.py3-none-any.whl
| Download URL | tkitScrapyMongoPipeline-0.0.0.116515135-py2.py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
cc287319403e18c3192939e1f587c71adf4b496ff04c7b2eeca2cc23d213e380
|
|
BLAKE2b-256 checksum How to use checksums |
b40210528fdc19f710bcf6515faffaedd32ae0f33968f412f9e1c16c5357513d
|
| 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.116515135
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.