class Post(Item): quote = Xpath("//span[@class = 'text']") author = Xpath("//small") async def save(self): quote = dict(zip(self.author, self.quote)) assert quote['Albert Einstein'] == '“Try not to become a man of success. Rather become a man of value.”'
class User(Item): username = Xpath('//title') karma = Css('.karma')
class User(Item): username = Css('.username') karma = Xpath('//[@class=karma]')