Skip to content

Commit

Permalink
Fix #2317 empty pages CEUR-WS scraper
Browse files Browse the repository at this point in the history
CEUR-WS scraper failed where metadata had a element for pages
but this was empty.
  • Loading branch information
fnielsen committed Jul 27, 2023
1 parent 6d14811 commit 8c26a42
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scholia/scrape/ceurws.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ def tree_to_papers(tree, proceedings, proceedings_q, iso639='en'):

# Pages
pages_element = element.xpath(".//span[@class='CEURPAGES']")
if len(pages_element) == 1:
if len(pages_element) == 1 and pages_element[0].text:
# At least one CEURPAGES element and the first one should be
# none-empty
pages = pages_element[0].text
paper['pages'] = pages
number_of_pages = pages_to_number_of_pages(pages)
Expand Down

0 comments on commit 8c26a42

Please sign in to comment.