Skip to content

Instantly share code, notes, and snippets.

@matiasinsaurralde
Created September 27, 2015 23:00
Show Gist options
  • Save matiasinsaurralde/4f6a74c96f0687e5e810 to your computer and use it in GitHub Desktop.
Save matiasinsaurralde/4f6a74c96f0687e5e810 to your computer and use it in GitHub Desktop.
from pyquery import PyQuery as pq
url = 'https://4.ipinfo.io/AS27866'
d = pq( url=url )
for td in d( 'td' ):
td = d( td )
print "soy un td: ", td.text()
# condicion que se podria usar como filtro
if '/' in td.text():
print "soy un td importante: ", td.text()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment