diff options
Diffstat (limited to 'scraper/s2-final-report.py')
| -rw-r--r-- | scraper/s2-final-report.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scraper/s2-final-report.py b/scraper/s2-final-report.py index 2ebd516c..e3e49c37 100644 --- a/scraper/s2-final-report.py +++ b/scraper/s2-final-report.py @@ -130,8 +130,8 @@ def process_single_paper(row, paper_id, addresses, aggregate_citations, unknown_ # address_count += 1 institution = inst[1] next_address = addresses.findObject(institution) - if next_address and next_address['address'] not in seen_here: - seen_here[next_address['address']] = True + if next_address and next_address['name'] not in seen_here: + seen_here[next_address['name']] = True address = next_address geocoded_addresses.append(next_address) if not address: @@ -141,11 +141,11 @@ def process_single_paper(row, paper_id, addresses, aggregate_citations, unknown_ found_addresses = [] if len(headings): for heading in headings: - l = heading.lower().strip() - if l: - next_address = addresses.findObject(l) - if next_address and next_address['address'] not in seen_here: - seen_here[next_address['address']] = True + possible_address = heading.lower().strip() + if possible_address: + next_address = addresses.findObject(possible_address) + if next_address and next_address['name'] not in seen_here: + seen_here[next_address['name']] = True address = next_address geocoded_addresses.append(next_address) if address: |
