Make sure we actually get the correct video IDs
- ID
a116e29- date
2024-02-15 08:11:30+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
8852e18- message
Make sure we actually get the correct video IDs- changed files
1 file, 1 addition, 16 deletions
Changed files
web/list_liked_youtube_videos.py (5104) → web/list_liked_youtube_videos.py (4734)
diff --git a/web/list_liked_youtube_videos.py b/web/list_liked_youtube_videos.py
index c7d32d2..aa5bfc4 100755
--- a/web/list_liked_youtube_videos.py
+++ b/web/list_liked_youtube_videos.py
@@ -124,21 +124,6 @@ class YouTubeClient:
if __name__ == "__main__":
youtube = YouTubeClient(label="download_liked_videos")
- # request = youtube.youtube.playlistItems().list(
- # part="snippet,contentDetails",
- # # onBehalfOfContentOwner=True,
- # playlistId='LL'
- # )
- # response = request.execute()
- #
- # # liked_playlist_id = next(
- # # playlist['id']
- # # for playlist in response['items']
- # # if
- # # )
- #
- # from pprint import pprint; pprint(response)
-
for video in youtube.get_liked_videos():
- video_id = video["id"]
+ video_id = video["snippet"]["resourceId"]["videoId"]
print(f"https://www.youtube.com/watch?v={video_id}")