Skip to content

Commit

Permalink
Merge branch 'master' of github.com:sunlightlabs/fiftystates
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesturk committed Sep 1, 2010
2 parents 77bbeee + 0a5bc55 commit e21537e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fiftystates/scrape/ca/legislators.py
Expand Up @@ -43,7 +43,7 @@ def scrape(self, chamber, term):
party = legislator.party

if party == 'DEM':
party = 'Democrat'
party = 'Democratic'
elif party == 'REP':
party = 'Republican'

Expand Down
2 changes: 1 addition & 1 deletion fiftystates/scrape/la/legislators.py
Expand Up @@ -54,7 +54,7 @@ def scrape_rep(self, name, term, url):
district = re.search("district(\d+).pdf", district).group(1)

if "Democrat District" in text:
party = "Democrat"
party = "Democratic"
elif "Republican District" in text:
party = "Republican"
elif "Independent District" in text:
Expand Down
3 changes: 3 additions & 0 deletions fiftystates/scrape/sd/legislators.py
Expand Up @@ -53,6 +53,9 @@ def scrape_legislator(self, name, chamber, term, url):
party = page.xpath("string(//span[contains(@id, 'Party')])")
party = party.strip()

if party == 'Democrat':
party = 'Democratic'

district = page.xpath("string(//span[contains(@id, 'District')])")
district = district.strip().lstrip('0')

Expand Down

0 comments on commit e21537e

Please sign in to comment.