Skip to main content

API to describe schema of data to extract them from HTML

Project description

https://travis-ci.org/lorien/item.png?branch=master https://coveralls.io/repos/lorien/item/badge.svg?branch=master https://pypip.in/download/item/badge.svg?period=month https://pypip.in/version/item/badge.svg https://landscape.io/github/lorien/item/master/landscape.png

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


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 hashes)

Uploaded Source

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