API to describe schema of data to extract them from HTML
Project description
Usage Example
from item import Item
from lxml.html import fromstring
class SomeStructure(Item):
id = IntegerField('//path/to/@id')
name = StringField('//path/to/name')
date = DateTimeField('//path/to/@datetime', '%Y-%m-%d %H:%M:%S')
structure = SomeStructure(fromstring(SOME_HTML))
print(structure.id)
print(structure.name)
print(structure.date)
Installation
pip install item
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
item-0.0.3.tar.gz
(7.6 kB
view details)
File details
Details for the file item-0.0.3.tar.gz
.
File metadata
- Download URL: item-0.0.3.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10068aa8d94a93ddda85ff074405aafa8b5d36fb8cd08c559a2e4f6cb598c489 |
|
MD5 | 3dbdec3c181004da0af1cf079b59363b |
|
BLAKE2b-256 | 89a43f1f6c84d64f22b4841850355634196d3698dc845c61bcbfaf2dcd4b8690 |