Versioning changes for Blizzard WoW Game Data APIs https://develop.battle.net/documentation/world-of-warcraft/game-data-apis
Go to file
Sergio Álvarez 4de6824f86 daily cron
Traceback (most recent call last):
  File "updater.py", line 183, in <module>
    updater.iterate_links(force_groups)
  File "updater.py", line 167, in iterate_links
    self.save_raw(real_path, response, inset=api['path'])
  File "updater.py", line 86, in save_raw
    json.dump(raw.json(), tmp, indent=2)
  File "/usr/lib/python3/dist-packages/requests/models.py", line 898, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3/dist-packages/simplejson/__init__.py", line 525, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

real	40m42,726s
user	1m17,962s
sys	0m6,509s
2021-05-24 14:49:45 +02:00
raw daily cron 2021-05-24 14:49:45 +02:00
.gitignore updated codebase 2021-05-14 00:34:22 +02:00
README.md only US 2021-05-14 13:16:23 +02:00
blizzard.py only US 2021-05-14 13:16:23 +02:00
config.py new structure, better code 2021-05-14 00:33:52 +02:00
cron.sh mtime tune 2021-05-15 10:28:08 +02:00
spec.py no more db, now using mtime from cached files 2021-05-14 23:11:40 +02:00
test-modified.py code split and modified header to speed up things. Luckly Blizzard support If-Modified-Since 2021-05-14 12:04:44 +02:00
updater.py mtime tune 2021-05-15 10:28:08 +02:00

README.md

Create a .credentials file with client_id:secret from https://develop.battle.net/access

With no crontab execute python3 updater.py.

Crontab, every day at 12:30h:

30 12 * * * cron.sh

Only US region is explored because all API are the same and this is the default API for Blizzard.

Without locale we get all the translations, so I don't iterate through locales. If you ask for a locale, you get the value right in the field.