Skip to content

Commit 0db2bef

Browse files
keko24arunkannawadi
authored andcommitted
Fixed total_results returning 0 when only a single publication exists.
1 parent 3b5a2e8 commit 0db2bef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scholarly/publication_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def _get_total_results(self):
7070
match = re.match(pattern=r'(^|\s*About)\s*([0-9,\.\s’]+)', string=x.text)
7171
if match:
7272
return int(re.sub(pattern=r'[,\.\s’]',repl='', string=match.group(2)))
73-
return 0
73+
return len(self._rows)
7474

7575
# Iterator protocol
7676

0 commit comments

Comments
 (0)