Skip to main content

API to extract content from HTML & XML documents

Project description

https://travis-ci.org/lorien/selection.png https://coveralls.io/repos/lorien/selection/badge.svg

API to extract data from HTML and XML documents.

Usage Example

Example:

from selection import XpathSelector
from lxml.html import fromstring

html = '<div><h1>test</h1><ul id="items"><li>1</li><li>2</li></ul></div>'
sel = XpathSelector(fromstring(html))
print(sel.select('//h1')).text()
print(sel.select('//li').text_list()
print(sel.select('//ul').attr('id')

Dependencies

  • lxml

Project details


Download files

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

Source Distribution

selection-0.0.4.tar.gz (2.9 kB view details)

Uploaded Source

File details

Details for the file selection-0.0.4.tar.gz.

File metadata

  • Download URL: selection-0.0.4.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for selection-0.0.4.tar.gz
Algorithm Hash digest
SHA256 4493c477bbcbc3d3a2ce970bb10c1dc58d1ecd383af1f17d8bb66d830845ee0d
MD5 3b63a6564c14e2db98e2085e23ca9ecb
BLAKE2b-256 b6929678fb08ad04bf89b93a2f585b841949dc2298b0e8d548eaf8bddc17d834

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page