lukasschwab / arxiv.py

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

Run retries recursively to sleep between erroneous responses #53

Closed lukasschwab closed 3 years ago

lukasschwab commented 3 years ago

Description

Sleeps between API request tries.

Breaking changes

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

None: even the _parse_feed interface is unchanged.

Relevant issues

List GitHub issues relevant to this change.

Resolves the in-code NOTE above _parse_feed:

# NOTE: if erroneous outcomes are so common that it's necessary to sleep
# after requests that return errors, _parse_feed can be rewritten
# recursively.

Follows up on PhosphorylatedRabbits/paperscraper#10; merits a version bump there.

Checklist

lukasschwab commented 3 years ago

Closing to keep my GitHub PR list shorter; can reopen if there are reports that this change would be useful.

lukasschwab commented 3 years ago

Reopening: https://github.com/PhosphorylatedRabbits/paperscraper/pull/10 indicates sleeping between retries may be useful for really big queries.