From 4acc12466fe0c8b619fb1ce2619b61fc6e729177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Arnauts?= Date: Mon, 26 Feb 2024 12:56:06 +0100 Subject: [PATCH] Bump API to 15 (#60) --- resources/lib/streamz/api.py | 2 +- resources/lib/streamz/util.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/lib/streamz/api.py b/resources/lib/streamz/api.py index d84e8b8..a417d5e 100644 --- a/resources/lib/streamz/api.py +++ b/resources/lib/streamz/api.py @@ -102,7 +102,7 @@ def get_storefront_category(self, storefront, category): result = json.loads(response.text) items = [] - for item in result.get('teasers'): + for item in result.get('row', {}).get('teasers', []): if item.get('target', {}).get('type') == CONTENT_TYPE_MOVIE: items.append(self._parse_movie_teaser(item)) diff --git a/resources/lib/streamz/util.py b/resources/lib/streamz/util.py index af5f061..4877961 100644 --- a/resources/lib/streamz/util.py +++ b/resources/lib/streamz/util.py @@ -32,8 +32,8 @@ def close(self): # Setup a static session that can be reused for all calls SESSION = requests.Session() SESSION.headers = { - 'User-Agent': 'STREAMZ/14.231023 (be.vmma.streamz; build:18041; Android 23) okhttp/4.11.0', - 'x-app-version': '14', + 'User-Agent': 'STREAMZ/15.231023 (be.vmma.streamz; build:18041; Android 23) okhttp/4.11.0', + 'x-app-version': '15', 'x-persgroep-mobile-app': 'true', 'x-persgroep-os': 'android', 'x-persgroep-os-version': '28',