Skip to content

Commit

Permalink
fix: 🐛 reduce the maximum sum of offset and limit to 1,000
Browse files Browse the repository at this point in the history
On October 31st S2 reduced the maximum sum of offset and limit from 10,000 to 1,000 results.
  • Loading branch information
danielnsilva committed Nov 21, 2023
1 parent 075f6a7 commit c3cf626
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion semanticscholar/PaginatedResults.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def __getitem__(self, key: int) -> Any:

def _has_next_page(self) -> bool:
has_more_results = (self._offset + self._limit) == self._next
under_limit = (self._offset + self._limit) < 9999
under_limit = (self._offset + self._limit) < 999
return has_more_results and under_limit

async def _request_data(self) -> Union[dict, List[dict]]:
Expand Down

0 comments on commit c3cf626

Please sign in to comment.