Ejemplo n.º 1
0
class Article(Entity):
    title = StringField('./h1/text()', xpath=True)
    content = StringField('./p/text()', xpath=True, all=True)
    authors = EntityField(Author,
                          './div[@class="author"]',
                          xpath=True,
                          all=True)
Ejemplo n.º 2
0
class ArticleC(Entity):
    title = StringField('h1::text')
    content = StringField('p::text', all=True)
    authors = EntityField(AuthorC, 'div.author', all=True)