Skip to content
This repository has been archived by the owner on Feb 2, 2022. It is now read-only.

Commit

Permalink
Add check for deceased field
Browse files Browse the repository at this point in the history
The deceased field will not be created in the dictionary
unless a match was found.

Fixes #106
  • Loading branch information
anthonybaulo committed Jun 8, 2019
1 parent 75dcb69 commit e56919b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scrapd/core/apd.py
Expand Up @@ -533,7 +533,9 @@ def parse_page_content(detail_page, notes_parsed=False):
d[Fields.DATE] = date_utils.parse_date(date_field_str)

# Parse the `Deceased` field.
d[Fields.DECEASED] = parse_deceased_field(normalized_detail_page)
deceased_field_str = parse_deceased_field(normalized_detail_page)
if deceased_field_str:
d[Fields.DECEASED] = deceased_field_str

# Parse the `Time` field.
d[Fields.TIME] = parse_time_field(normalized_detail_page)
Expand Down

0 comments on commit e56919b

Please sign in to comment.