API to extract content from HTML & XML documents
Project description
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
Release history Release notifications | RSS feed
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.5.tar.gz
(5.2 kB
view details)
File details
Details for the file selection-0.0.5.tar.gz
.
File metadata
- Download URL: selection-0.0.5.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab9c5eaf98bb4d18899fad24d63f4282c62c6687c4c87a10454cdecf5126d61f |
|
MD5 | 435431bdecbc5283e3f5c8c9c6659571 |
|
BLAKE2b-256 | 9428d7906bb5f47a6a3739fca0ee5e13ecd1fef7f564498b45c99ed6ab3faca3 |