Skip to content

Instantly share code, notes, and snippets.

@alexpetralia
Created September 25, 2016 01:04
Show Gist options
  • Save alexpetralia/e08db2426edb8f06cd73e073c244015b to your computer and use it in GitHub Desktop.
Save alexpetralia/e08db2426edb8f06cd73e073c244015b to your computer and use it in GitHub Desktop.
domain = 'http://www.igmchicago.org'
response = requests.get(domain + '/igm-economic-experts-panel')
soup = BeautifulSoup(response.text, 'lxml')
polls = soup.findAll('div', {'class': 'poll-listing'})
topics = {}
for poll in polls:
topic = poll.find('h2').get_text()
handle = poll.find('h3', {'class': 'surveyQuestion'}).a['href']
topics[topic] = handle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment