From c32eb32d744d1cccb1d727c1d745f2a3a483f938 Mon Sep 17 00:00:00 2001 From: Ubuntu Date: Fri, 3 May 2024 19:45:49 +0000 Subject: [PATCH] verbose logging --- spotify_to_ytmusic/reddit.py | 1 + spotify_to_ytmusic/top.py | 1 + spotify_to_ytmusic/ytmusic.py | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/spotify_to_ytmusic/reddit.py b/spotify_to_ytmusic/reddit.py index 3492516..d1bf520 100644 --- a/spotify_to_ytmusic/reddit.py +++ b/spotify_to_ytmusic/reddit.py @@ -49,6 +49,7 @@ def get_top_new(self, time="week"): youtube_pos = [] count = 0 for url in urls: + print(url) if "open.spotify.com" in url: spotify.append(url) count += 1 diff --git a/spotify_to_ytmusic/top.py b/spotify_to_ytmusic/top.py index ee7569c..e1bcb3a 100644 --- a/spotify_to_ytmusic/top.py +++ b/spotify_to_ytmusic/top.py @@ -26,6 +26,7 @@ def top(args): if i in results["youtube_pos"]: r = results["youtube"][results["youtube_pos"].index(i)] match = re.search(r"(?:v=|\/)([0-9A-Za-z_-]{11}).*", r) # from pytube extract.video_id + print(f"youtube '{match.group(1)}'") videoIds.append(match.group(1)) else: videoIds.extend(search_results[track_counter : track_counter + track_counts[counter]]) diff --git a/spotify_to_ytmusic/ytmusic.py b/spotify_to_ytmusic/ytmusic.py index a8ba645..5f2e2ab 100644 --- a/spotify_to_ytmusic/ytmusic.py +++ b/spotify_to_ytmusic/ytmusic.py @@ -18,6 +18,9 @@ def __init__(self): self.api = YTMusic(headers, settings["youtube"]["user_id"]) def create_playlist(self, name, info, privacy="PRIVATE", tracks=None): + print(info) + print(privacy) + print(tracks) return self.api.create_playlist(name, info, privacy, video_ids=tracks) def search_songs(self, tracks): @@ -34,6 +37,7 @@ def search_songs(self, tracks): notFound.append(query) else: targetSong = get_best_fit_song_id(result, song) + print(f"ytmusic '{query}' '{targetSong}'") if targetSong is None: notFound.append(query) else: