Skip to content

Commit

Permalink
refactor: use regex for parsing page count
Browse files Browse the repository at this point in the history
need to correct false data coming from zotero
  • Loading branch information
babslgam committed May 28, 2024
1 parent 6b05bd5 commit 3dfe069
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apis_ontology/scripts/import_zotero_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ def create_entities(item, source):

pub_date = item_date
if num_pages:
pages = int(num_pages)
pages = int(re.sub("[^0-9]", "", num_pages))
if pages > 0:
page_count = pages

Expand Down

0 comments on commit 3dfe069

Please sign in to comment.