Merge 8c8affde5a into ed19ffa020
This commit is contained in:
commit
812a31643a
|
|
@ -114,7 +114,9 @@ class Parser:
|
|||
item_type = "video"
|
||||
elif len_id_str == 24:
|
||||
item_type = "channel"
|
||||
elif len_id_str in (34, 26, 18) or id_str.startswith("TA_playlist_"):
|
||||
elif len_id_str in (34, 26, 18, 13) or id_str.startswith(
|
||||
"TA_playlist_"
|
||||
):
|
||||
item_type = "playlist"
|
||||
else:
|
||||
raise ValueError(f"not a valid id_str: {id_str}")
|
||||
|
|
|
|||
|
|
@ -77,15 +77,28 @@ CHANNEL_VID_TYPES = [
|
|||
PLAYLIST_URL_IN = [
|
||||
"PL96C35uN7xGJu6skU4TBYrIWxggkZBrF5",
|
||||
"https://www.youtube.com/playlist?list=PL96C35uN7xGJu6skU4TBYrIWxggkZBrF5",
|
||||
"https://www.youtube.com/playlist?list=PLE6-bhDW8GWg",
|
||||
]
|
||||
PLAYLIST_OUT = [
|
||||
{
|
||||
"type": "playlist",
|
||||
"url": "PL96C35uN7xGJu6skU4TBYrIWxggkZBrF5",
|
||||
"vid_type": "unknown",
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "playlist",
|
||||
"url": "PL96C35uN7xGJu6skU4TBYrIWxggkZBrF5",
|
||||
"vid_type": "unknown",
|
||||
},
|
||||
{
|
||||
"type": "playlist",
|
||||
"url": "PLE6-bhDW8GWg",
|
||||
"vid_type": "unknown",
|
||||
},
|
||||
]
|
||||
PLAYLIST_TEST_CASES = [
|
||||
(i, [PLAYLIST_OUT[idx]]) for idx, i in enumerate(PLAYLIST_URL_IN)
|
||||
]
|
||||
PLAYLIST_TEST_CASES = [(i, PLAYLIST_OUT) for i in PLAYLIST_URL_IN]
|
||||
|
||||
# personal playlists
|
||||
EXPECTED_WL = [{"type": "playlist", "url": "WL", "vid_type": "unknown"}]
|
||||
|
|
|
|||
Loading…
Reference in New Issue