From ca2b4f4d59d5ef453826053bc561a0e1a6245c1e Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Sat, 3 Jul 2021 11:14:24 +0300 Subject: [PATCH] twitch: Do not add initial result search twice --- twitch.py | 1 - 1 file changed, 1 deletion(-) diff --git a/twitch.py b/twitch.py index 8d54eb8..ceec7ac 100644 --- a/twitch.py +++ b/twitch.py @@ -150,7 +150,6 @@ class TwitchClient: result = {'_total': 0, 'streams': []} data = self.do_q_auth_v6(init_q_template.format(base, lang, 100, game_id), header) - result['streams'].extend(data['data']) while len(data.get('data', [])) > 0: # there must be non zero value, but search is kinda broken now result['streams'].extend(data['data']) data = self.do_q_auth_v6(q_template.format(base, lang, 100, data['pagination']['cursor'], game_id), header)