Skip to main content

selectorlib

https://img.shields.io/pypi/v/selectorlib.svg https://img.shields.io/travis/scrapehero/selectorlib.svg Documentation Status Updates

A library to read a YML file with Xpath or CSS Selectors and extract data from HTML pages using them

Example

>>> from selectorlib import Extractor
>>> yaml_string = """
    title:
        css: "h1"
        type: Text
    link:
        css: "h2 a"
        type: Link
    """
>>> extractor = Extractor.from_yaml_string(yaml_string)
>>> html = """
    <h1>Title</h1>
    <h2>Usage
        <a class="headerlink" href="http://test">¶</a>
    </h2>
    """
>>> extractor.extract(html)
{'title': 'Title', 'link': 'http://test'}

History

Metadata

Release files for selectorlib 0.16.0

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

Source distribution (sdist)

Source distribution for selectorlib 0.16.0
File Size Uploaded Provenance Actions
selectorlib-0.16.0.tar.gz 188.8 kB Without provenance Details for selectorlib-0.16.0.tar.gz

Built distribution (wheel)

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

Total release size: 194.7 kB

Release files / selectorlib-0.16.0.tar.gz

Download URL selectorlib-0.16.0.tar.gz
Size 188.8 kB
Tags Source
SHA-256 checksum
How to use checksums
154f7c5f39bc825a0717b24ca2cc0b95dcb2caa1669239f3d4ac6e41af398731
BLAKE2b-256 checksum
How to use checksums
0057f1ae8c2740980eec4a142fd8b1f6603294bba079add5e29bf62f51503c96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.1

Release files / selectorlib-0.16.0-py2.py3-none-any.whl

Download URL selectorlib-0.16.0-py2.py3-none-any.whl
Size 5.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
007c156d01ab8de86f72f0914d66d704f6fb4ebda0db0e04f204083d63e55bc6
BLAKE2b-256 checksum
How to use checksums
1e3e7ad0a01b07c066cf79c431324970869345e4d249242d70f20e939a5c630b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.1

Security for selectorlib 0.16.0

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