JustAnotherArchivist
c2f6f5054c
Handle actual 429
пре 1 година
JustAnotherArchivist
5bc3d4b020
Fix crash on an empty response
This check was a leftover from the resumeKey pagination, where empty responses are supposed to be impossible. With the page pagination, they are possible.
пре 2 година
JustAnotherArchivist
7f25c092d1
Catch other connection errors
пре 2 година
JustAnotherArchivist
f8352809f3
Handle ConnectionResetError
пре 2 година
JustAnotherArchivist
0b34268210
Catch socket.timeout, which is a separate exception class from TimeoutError before Python 3.10
пре 2 година
JustAnotherArchivist
0f7a2b32a3
Log number of results on a page
пре 2 година
JustAnotherArchivist
628aeb052f
Handle rate limiting
пре 2 година
JustAnotherArchivist
d3ea3ce8a0
Switch from urllib to http.client to reuse connections
пре 2 година
JustAnotherArchivist
8f7619ff3a
Add retries
пре 2 година
JustAnotherArchivist
f98fdd5f01
Fix printing HTTP response line to stdout instead of stderr
пре 2 година
JustAnotherArchivist
c9400ac46f
Fix recognition of command without optional parts
пре 2 година
JustAnotherArchivist
5ca15a7c94
Add concurrency support
The proper way to do that (with asyncio) is of course aiohttp. A major drawback of the implemented approach is that running tasks can't be cancelled in case of an error. However, it works with just the standard library, and that advantage outweighs the awkward error handling for now.
пре 2 година
JustAnotherArchivist
5121524f83
Log retrieval of showNumPages
пре 2 година
JustAnotherArchivist
aba7a1b0b8
Replace resumeKey pagination with page number pagination
resumeKey pagination is horribly broken. It may return incomplete results or infinite loops.
пре 2 година
JustAnotherArchivist
303bb69c37
Add ia-cdx-search
пре 2 година