Skip to content

Commit

Permalink
fixed scraper
Browse files Browse the repository at this point in the history
  • Loading branch information
dwillis committed Apr 18, 2024
1 parent f7f6c34 commit 5188623
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crime-log/crime_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
for incident in incidents:
if incident.find('case_number').contents[0] == "23-03572":
continue
title = incident.find('incident_code').contents[0]
if incident.find('incident_code').contents != []:
title = incident.find('incident_code').contents[0]
else:
title = incident.find('case_comments').contents[0].strip()
id = incident.find('case_number').contents[0]
datetime = parse(incident.find('incident_start_date_time').contents[0])
year = datetime.year
Expand Down

0 comments on commit 5188623

Please sign in to comment.