Skip to content

Instantly share code, notes, and snippets.

@yannisxu
Created April 22, 2013 15:20
Show Gist options
  • Save yannisxu/5435881 to your computer and use it in GitHub Desktop.
Save yannisxu/5435881 to your computer and use it in GitHub Desktop.
pyquery each用法
texts = []
lis = pq('li')
def get(i,e):
e = pq(e)
texts.append(e.text())
lis.each(get)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment