Skip to content

Instantly share code, notes, and snippets.

View laurentb's full-sized avatar
🐧
.

Laurent Bachelier laurentb

🐧
.
View GitHub Profile
@laurentb
laurentb / gist:2221598
Created March 27, 2012 23:53
lol lxml
a=lxml.html.fromstring(u'<b>coucou</b> <i>héhé</i>')
a.xpath('//b')[0].text # 'coucou'
a.xpath('//i')[0].text # u'h\xc3\xa9h\xc3\xa9'