From 8956bb38fcf95ca242a1582d382df6b323c7fa74 Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Fri, 23 Jun 2023 18:10:50 +0200 Subject: [PATCH] Fix numeric keys not working --- src/handler.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/handler.py b/src/handler.py index 8a2b374..58326aa 100644 --- a/src/handler.py +++ b/src/handler.py @@ -40,6 +40,8 @@ def get_url_content(url): def get_dict_entry_fallback(d, key, fallback): if key and key in d: return d[key] + if key.isnumeric() and int(key) in d: + return d[int(key)] if fallback in d: return d[fallback] return d.get('_default', None)