From db6d5d9e4c21a67212fb17fc3f0ddc372cfa2ba3 Mon Sep 17 00:00:00 2001 From: Hellow <74311245+HeIIow2@users.noreply.github.com> Date: Thu, 27 Jul 2023 19:18:56 +0200 Subject: [PATCH] smth --- src/music_kraken/pages/youtube_music.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/music_kraken/pages/youtube_music.py b/src/music_kraken/pages/youtube_music.py index 2503bd4..d60f484 100644 --- a/src/music_kraken/pages/youtube_music.py +++ b/src/music_kraken/pages/youtube_music.py @@ -223,9 +223,11 @@ class YoutubeMusic(Page): _estimated_time = sum(len(search_query) * random.randint(50, 100) for _ in search_query.strip()) FIRST_EDITED_TIME = LAST_EDITED_TIME - _estimated_time if LAST_EDITED_TIME - self.start_millis > _estimated_time else random.randint(50, 100) + query_continue = "" if self.credentials.ctoken == "" else f"&ctoken={self.credentials.ctoken}&continuation={self.credentials.ctoken}" + # construct the request r = self.connection.post( - url=get_youtube_url(path="/youtubei/v1/search", query=f"key={self.credentials.api_key}&prettyPrint=false"), + url=get_youtube_url(path="/youtubei/v1/search", query=f"key={self.credentials.api_key}&prettyPrint=false"+query_continue), json={ "context": {**self.credentials.context, "adSignalsInfo":{"params":[]}}, "query": search_query,