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

Release files for selectorlib 0.12.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.12.0
File Size Uploaded
selectorlib-0.12.0.tar.gz 188.7 kB Details

Built distribution (wheel)

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

Total release size: 194.5 kB

Release files / selectorlib-0.12.0.tar.gz

Download URL selectorlib-0.12.0.tar.gz
Size 188.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b7cc3d4a5ed31700c32ffa8e5a5c24b8c3c143f1938550e1420eae016875d96f
BLAKE2b-256 checksum
How to use checksums
7f7538cc8f9840350e9a9953a287bcc0b3d65c8b0c72aaaf8d0d38cb2b5ec1e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1

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

Download URL selectorlib-0.12.0-py2.py3-none-any.whl
Size 5.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
6ddb83c81fea586c2d6263b2f4c82f279f9077f372b0eb027d567113f524a94d
BLAKE2b-256 checksum
How to use checksums
df692e72802ebe4f8d19cf09730b40f23ec80ad136112f19a66ae80ca5307087
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.1

Release history Release notifications | RSS feed

0.14.0

2 release files

This release

0.12.0 This release

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

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