Skip to main content

simple-spider-tool17


simple-spider-tool 0.0.18及后续版本兼容之前版本使用的可选扩展包

安装

pip install simple-spider-tool[seventeen]

简单使用

from simple_spider_tools 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))

Download files

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

Source Distribution

simple_spider_tool17-0.17.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

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

simple_spider_tool17-0.17-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file simple_spider_tool17-0.17.tar.gz.

File metadata

  • Download URL: simple_spider_tool17-0.17.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.8

File hashes

Hashes for simple_spider_tool17-0.17.tar.gz
Algorithm Hash digest
SHA256 e1b98c3db7d06f449ddd68a6d8e81c042cfc4cebd95988333072240969dea680
MD5 7f89b66b7568ea9edfb7ab21d4f14431
BLAKE2b-256 1dc18b53b6df62b763292d46e2266f7e8082c49f67638e8333818b9c27c1ddf9

See more details on using hashes here.

File details

Details for the file simple_spider_tool17-0.17-py3-none-any.whl.

File metadata

File hashes

Hashes for simple_spider_tool17-0.17-py3-none-any.whl
Algorithm Hash digest
SHA256 20f7cc6f6b0e938c74087b9589b85548255e9b378f662934494a0dc045770e58
MD5 0ef9455c13582fb46d31264e6cace10f
BLAKE2b-256 dafe1c7c061189abd4ae08eb1ea7c653e6ccb165a09c64e69ecc3c2bcc188ddc

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.17 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page