diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2022-11-06 20:33:03 +0100 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2022-11-06 20:33:03 +0100 |
commit | 3ad3161f356752a24df51079e5b5d306319c8662 (patch) | |
tree | 5a0eebf865fc088e50c18cb52ff0d759f7f9dcc2 /gather.py | |
parent | fix if server returns 500 for some reason meaning acsm does not exist (diff) | |
download | biblos-stat-3ad3161f356752a24df51079e5b5d306319c8662.tar biblos-stat-3ad3161f356752a24df51079e5b5d306319c8662.tar.gz biblos-stat-3ad3161f356752a24df51079e5b5d306319c8662.tar.bz2 biblos-stat-3ad3161f356752a24df51079e5b5d306319c8662.tar.lz biblos-stat-3ad3161f356752a24df51079e5b5d306319c8662.tar.xz biblos-stat-3ad3161f356752a24df51079e5b5d306319c8662.tar.zst biblos-stat-3ad3161f356752a24df51079e5b5d306319c8662.zip |
Diffstat (limited to '')
-rwxr-xr-x | gather.py | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -80,6 +80,7 @@ try: logger.info(f"continuing from latest {borrow}") acsm_id = borrow.id+1 r = requests.get(f"https://www.biblos.si/izposoja/prenesi/{acsm_id}.acsm", headers={"User-Agent": f"python-requests/{requests.__version__} (biblos-stat acsm scraper, contact operator: {operator_contact})"}) + r.encoding = "UTF-8" if (r.status_code == 200): failed_acsms_not200_in_a_row = 0 if r.status_code != 200: |