summaryrefslogtreecommitdiffstats
path: root/gather.py
diff options
context:
space:
mode:
Diffstat (limited to 'gather.py')
-rwxr-xr-xgather.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/gather.py b/gather.py
index d52995c..05f35f4 100755
--- a/gather.py
+++ b/gather.py
@@ -94,6 +94,9 @@ try:
if acsm_id < guaranteed_large_acsm_id:
logger.error(f"this shouldn't happen. I have a hardcoded value that tells me that at time of program writing, acsm id {guaranteed_large_acsm_id} did exist on the server. dying anyways.")
break
+ elif r.text.startswith("Napaka pri prenosu"):
+ logger.warning(f"'napaka pri prenosu' received from http for acsm id {acsm_id}, skipping")
+ force_acsm_id = acsm_id+1
elif r.text.startswith('<error xmlns="http://ns.adobe.com/adept" data="E_URLLINK_NO_SUCH_RESOURCE resid urn:uuid:00000000-1002-0000-0009-78') or r.text.startswith('<error xmlns="http://ns.adobe.com/adept" data="E_URLLINK_NO_DISTRIBUTION_RIGHTS urn:uuid:00000000-1002-0000-0009-78'):
isbn = int([x for x in r.text.split() if x.startswith("urn:uuid:00000000-1002-0000-0009-78")][0].split("-").pop())+int(9e12)
borrow = Borrow(id=acsm_id, isbn=isbn, obtained=int(time()))