Skip to content

Commit

Permalink
error logs for the new format youtube seems to be introducing slowly
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Sep 4, 2024
1 parent 13f9265 commit 3a0c4e4
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions tutubo/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,22 +453,12 @@ def _extract_playlists(raw_json: str) -> Tuple[List[str], Optional[str]]:
elif 'lockupViewModel' in p:
# TODO - i got this one once! but can not replicate consistently...
# implement once we can get the output again
pass
print(p)
raise RuntimeError("Youtube returned the new format 'lockupViewModel' , parsing is not yet implemented")

# remove duplicates
return (
uniqueify(
list(
# only extract the video ids from the video data
map(
lambda x: (
f"/playlist?list="
f"{x['gridPlaylistRenderer']['playlistId']}"
),
[p for p in playlists if 'gridPlaylistRenderer' in p]
)
),
),
uniqueify(list(map(lambda x: f"/playlist?list={x['playlistId']}", playlists))),
continuation,
)

Expand Down

0 comments on commit 3a0c4e4

Please sign in to comment.