simple spider tool
在实际工作中,沉淀的一些简易、好用的爬虫工具,减少重复代码与文件冗余,希望一样能为使用者带来益处。如果您也想贡献好的代码片段,请将代码以及描述,通过邮箱( xingcys@gmail.com )发送给我。代码格式是遵循自我主观,如存在不足敬请指出!
安装
pip install simple-spider-tool
简单使用
from simple_spider_tool import format_json, jsonpath
data = {
"code": 200,
"data": [
{
"id": 1,
"username": "admin",
"level": "boss"
},
{
"id": 2,
"username": "user",
"level": "staff"
}
]
}
boss_name = jsonpath(data, '$.data[?(@.level=="boss")].username', first=True)
all_user_info = jsonpath(data, '$.data[*].username')
print(boss_name)
print(format_json(all_user_info))
兼容使用
在0.0.18对包目录发生改变,由simple_spider_tools更改为simple_spider_tool,如有使用过低于0.0.18版本,请通过安装兼容扩展包以达到兼容使用
pip install simple-spider-tool[seventeen]
链接
Metadata
Release files for simple-spider-tool 0.0.19
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 | |
|---|---|---|---|---|
| simple_spider_tool-0.0.19.tar.gz | 4.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simple_spider_tool-0.0.19-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.8 kB
Release files / simple_spider_tool-0.0.19.tar.gz
| Download URL | simple_spider_tool-0.0.19.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce11ff6cf137a3f1e8b5f76f64956fded2db1f9217facf5acec69d740d637d59
|
|
BLAKE2b-256 checksum How to use checksums |
9f7d81e82e64e809d9bed247b110f711a8f56ad97feaf757bde4af82f24fd0bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.8
|
Release files / simple_spider_tool-0.0.19-py3-none-any.whl
| Download URL | simple_spider_tool-0.0.19-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a1e0dd25ea26c9656a46bcb60b34fe6f71dc6484763b0d745f30ca1ffd1c5f66
|
|
BLAKE2b-256 checksum How to use checksums |
9ca904c331fa5b70a8b6b1c5453b0ff6c92a85f8749a9ab5e81d67c6c229b98e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.8
|
Security for simple-spider-tool 0.0.19
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.