lukasschwab / arxiv.py

Python wrapper for the arXiv API
MIT License
1.11k stars 123 forks source link

Making offset configurable for Client.results(...) #101

Closed 42nick closed 1 year ago

42nick commented 1 year ago

In case a longer query fails you can receive an error looking like e.g. arxiv.arxiv.UnexpectedEmptyPageError: Page of results was unexpectedly empty (http://export.arxiv.org/api/query?search_query=cat%3Acs.CV&id_list=&sortBy=submittedDate&sortOrder=descending&start=2000&max_results=100)

The offset would be 2000 in that example. To prevent to start the same query beginning from zero again, you could provide offset as an argument to restart the query from the point onwards.

Description

Breaking changes

List any changes that break the API usage supported on master.

Relevant issues

List GitHub issues relevant to this change.

Checklist

lukasschwab commented 1 year ago

Hi @42nick –– this looks like a tidy solution. I'll review in more detail tomorrow.

For starters, mind updating this to pass make lint? Looks like a couple of whitespace issues.

You might also run make docs.