aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_youtube_lists.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan@gmail.com>2021-02-20 02:14:36 +0530
committerpukkandan <pukkandan@gmail.com>2021-02-20 02:32:22 +0530
commitbc2ca1bb75d586b75d83a6f60b680ee07227ff28 (patch)
treee00af2ced38c0a0c1dfead4d27f3edba9c9651e4 /test/test_youtube_lists.py
parent5e41dca334b152d3757cff318c5f72843aeea255 (diff)
downloadhypervideo-pre-bc2ca1bb75d586b75d83a6f60b680ee07227ff28.tar.lz
hypervideo-pre-bc2ca1bb75d586b75d83a6f60b680ee07227ff28.tar.xz
hypervideo-pre-bc2ca1bb75d586b75d83a6f60b680ee07227ff28.zip
Update to ytdl-commit-cf2dbec
https://github.com/ytdl-org/youtube-dl/commit/cf2dbec6301177a1fddf72862de05fa912d9869d Except: [kakao] improve info extraction and detect geo restriction https://github.com/ytdl-org/youtube-dl/commit/d8085580f63ad3b146a31712ff76cf41d5a4558a
Diffstat (limited to 'test/test_youtube_lists.py')
-rw-r--r--test/test_youtube_lists.py19
1 files changed, 14 insertions, 5 deletions
diff --git a/test/test_youtube_lists.py b/test/test_youtube_lists.py
index a693963ef..d9b8fa550 100644
--- a/test/test_youtube_lists.py
+++ b/test/test_youtube_lists.py
@@ -12,6 +12,7 @@ from test.helper import FakeYDL
from youtube_dlc.extractor import (
YoutubePlaylistIE,
+ YoutubeTabIE,
YoutubeIE,
)
@@ -57,14 +58,22 @@ class TestYoutubeLists(unittest.TestCase):
entries = result['entries']
self.assertEqual(len(entries), 100)
- def test_youtube_flat_playlist_titles(self):
+ def test_youtube_flat_playlist_extraction(self):
dl = FakeYDL()
dl.params['extract_flat'] = True
- ie = YoutubePlaylistIE(dl)
- result = ie.extract('https://www.youtube.com/playlist?list=PL-KKIb8rvtMSrAO9YFbeM6UQrAqoFTUWv')
+ ie = YoutubeTabIE(dl)
+ result = ie.extract('https://www.youtube.com/playlist?list=PL4lCao7KL_QFVb7Iudeipvc2BCavECqzc')
self.assertIsPlaylist(result)
- for entry in result['entries']:
- self.assertTrue(entry.get('title'))
+ entries = list(result['entries'])
+ self.assertTrue(len(entries) == 1)
+ video = entries[0]
+ self.assertEqual(video['_type'], 'url_transparent')
+ self.assertEqual(video['ie_key'], 'Youtube')
+ self.assertEqual(video['id'], 'BaW_jenozKc')
+ self.assertEqual(video['url'], 'BaW_jenozKc')
+ self.assertEqual(video['title'], 'youtube-dl test video "\'/\\ä↭𝕐')
+ self.assertEqual(video['duration'], 10)
+ self.assertEqual(video['uploader'], 'Philipp Hagemeister')
if __name__ == '__main__':