commit a484cc6a88298e82100dd7df642f78b369a7d136 parent baf18f9fc50a0b6fef50460a76c33b2ddc57486e Author: Antoine Amarilli <a3nm@a3nm.net> Date: Sun, 11 Oct 2015 02:55:27 +0200 oops Diffstat:
get_votes.py | | | 5 | +++-- |
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/get_votes.py b/get_votes.py @@ -25,12 +25,13 @@ if __name__ == '__main__': sys.exit(1) for user in users: - data = requests.get(VOTE_URL % user, headers=HEADERS) + url = VOTE_URL % user + data = requests.get(url, headers=HEADERS) time.sleep(1) votes_tree = BeautifulSoup(data.text, 'html.parser') # see get_propositions.py - for div in tree.find_all('div'): + for div in votes_tree.find_all('div'): try: c = div.get("class") except KeyError: