JustAnotherArchivist
5ba7d26621
Fix error when no arguments are provided
1 year ago
JustAnotherArchivist
c2f6f5054c
Handle actual 429
1 year ago
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 years ago
JustAnotherArchivist
7f25c092d1
Catch other connection errors
2 years ago
JustAnotherArchivist
f8352809f3
Handle ConnectionResetError
2 years ago
JustAnotherArchivist
0b34268210
Catch socket.timeout, which is a separate exception class from TimeoutError before Python 3.10
2 years ago
JustAnotherArchivist
0f7a2b32a3
Log number of results on a page
2 years ago
JustAnotherArchivist
628aeb052f
Handle rate limiting
2 years ago
JustAnotherArchivist
d3ea3ce8a0
Switch from urllib to http.client to reuse connections
2 years ago
JustAnotherArchivist
8f7619ff3a
Add retries
2 years ago
JustAnotherArchivist
f98fdd5f01
Fix printing HTTP response line to stdout instead of stderr
2 years ago
JustAnotherArchivist
c9400ac46f
Fix recognition of command without optional parts
2 years ago
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 years ago
JustAnotherArchivist
5121524f83
Log retrieval of showNumPages
2 years ago
JustAnotherArchivist
aba7a1b0b8
Replace resumeKey pagination with page number pagination
resumeKey pagination is horribly broken. It may return incomplete results or infinite loops.
2 years ago
JustAnotherArchivist
303bb69c37
Add ia-cdx-search
2 years ago