Permalink
Browse files

Use the right term_data data structure

  • Loading branch information...
Duncan Parkes
Duncan Parkes committed May 20, 2015
1 parent e5287f6 commit 92963863c9712c3808fe57d0a5f36db17f0541b7
Showing with 1 addition and 2 deletions.
  1. +1 −2 scraper.py
View
@@ -14,7 +14,7 @@
data = {}
term_data = {}
term_data = []
def handle_chamber(chamber_name, source_url, data, term_data):
resp = requests.get(source_url)
@@ -24,7 +24,6 @@ def handle_chamber(chamber_name, source_url, data, term_data):
terms = [(x.find('span').text.strip(), urljoin(source_url, x.get('href')))
for x in root.cssselect('.menu-treemenu')[0].cssselect('a')]
term_data = []
for term_name, term_url in terms:
term_number, start_date, end_date = re.match(r'(\d*)[^\d]+(\d{4})[ -]+(\d{4})', term_name).groups()
term = {

0 comments on commit 9296386

Please sign in to comment.