Created
September 25, 2016 01:04
-
-
Save alexpetralia/e08db2426edb8f06cd73e073c244015b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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