File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,6 @@ def normalize(arxiv_id: str) -> tuple[int | None, int | None]:
140140 # If the year is different, compare the years
141141 else :
142142 return paper_id_norm [0 ] > reference_id_norm [0 ]
143- return False
144143
145144 def fetch (
146145 self ,
@@ -278,8 +277,12 @@ def fetch(
278277 # Incrementing the start index for the next batch
279278 self .start_index += self .max_results
280279
280+ # If the fetched results are less than the starting point, increment the start index
281+ if not papers :
282+ self .start_index += self .max_results
283+
281284 # Storing last fetched ID to the file if `start_from_filepath` is specified
282- if write :
285+ if write and papers :
283286 with open (self .fetched_ids_file , "w" ) as f :
284287 f .write (papers [- 1 ].id )
285288 return papers
You can’t perform that action at this time.
0 commit comments