Police-Data-Accessibility-Project / scrapers

Code relating to scraping public police data.
https://pdap.io
GNU General Public License v3.0
157 stars 35 forks source link

Fixed mistake parsing charge description & statute. #9

Closed OscarVanL closed 4 years ago

OscarVanL commented 4 years ago

This PR fixes a mistake separating the charge description and statute from the full charge string in the case there were twos sets of brackets.

For instance, when parsing the text: FELON IN POSSESSION OF AMMUNITION (ACTUAL POSSESSION) (79023)

Before this would be parsed as: description=='FELON IN POSSESSION OF AMMUNITION', statute=='ACTUAL POSSESSION'

Now this is correctly parsed as: description=='FELON IN POSSESSION OF AMMUNITION (ACTUAL POSSESSION)', statute==' 79023'