You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

selectorlib

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

selectorlib

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

0.16.0
pipPyPI
Maintainers
2

=========== selectorlib

.. image:: https://img.shields.io/pypi/v/selectorlib.svg :target: https://pypi.python.org/pypi/selectorlib

.. image:: https://img.shields.io/travis/scrapehero/selectorlib.svg :target: https://travis-ci.org/scrapehero/selectorlib

.. image:: https://readthedocs.org/projects/selectorlib/badge/?version=latest :target: https://selectorlib.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status

.. image:: https://pyup.io/repos/github/scrapehero/selectorlib/shield.svg :target: https://pyup.io/repos/github/scrapehero/selectorlib/ :alt: 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 = """

Title

Usage

""" extractor.extract(html) {'title': 'Title', 'link': 'http://test'}

======= History

Keywords

selectorlib

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts