Skip to content

Instantly share code, notes, and snippets.

@yurivictor
Last active December 22, 2015 16:39
Show Gist options
  • Save yurivictor/6500828 to your computer and use it in GitHub Desktop.
Save yurivictor/6500828 to your computer and use it in GitHub Desktop.
Get the names of riptide interviewees
# Result: https://gist.github.com/yurivictor/6500840
import requests
from pyquery import PyQuery as pq
URL = 'http://www.niemanlab.org/riptide/'
def get_names():
request = requests.get( URL )
html = request.content
names = pq( html )( 'div[data-namer]' )
for value in names:
name = value.attrib['data-namer']
print name + ','
get_names()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment