diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2022-11-07 23:24:13 +0100 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2022-11-07 23:24:13 +0100 |
commit | beba92693388573762e72121aa5b4d8129e2a3c7 (patch) | |
tree | b2dd4ec84fea20e87ea0b1887dca762d5e119482 /gather.py | |
parent | oops, error can also happen when not in the deleted void gap - just see diff :facepalm: (diff) | |
download | biblos-stat-beba92693388573762e72121aa5b4d8129e2a3c7.tar biblos-stat-beba92693388573762e72121aa5b4d8129e2a3c7.tar.gz biblos-stat-beba92693388573762e72121aa5b4d8129e2a3c7.tar.bz2 biblos-stat-beba92693388573762e72121aa5b4d8129e2a3c7.tar.lz biblos-stat-beba92693388573762e72121aa5b4d8129e2a3c7.tar.xz biblos-stat-beba92693388573762e72121aa5b4d8129e2a3c7.tar.zst biblos-stat-beba92693388573762e72121aa5b4d8129e2a3c7.zip |
Diffstat (limited to '')
-rwxr-xr-x | gather.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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())) |