Skip to content

Instantly share code, notes, and snippets.

@d1b
Created December 14, 2010 08:49
Show Gist options
  • Save d1b/740158 to your computer and use it in GitHub Desktop.
Save d1b/740158 to your computer and use it in GitHub Desktop.
from lxml import html
doc = html.parse("$stuff")
for x in doc.xpath("//a[@href and @class='l']"):
print x.attrib['href'].split("/")[2]#, x.attrib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment