#!/usr/bin/env python
# encoding: utf-8
-
# Allow direct execution
import os
import sys
import unittest
-from youtube_dl.extractor.ivi import IviCompilationIE
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from test.helper import FakeYDL
BambuserChannelIE,
BandcampAlbumIE,
SmotriCommunityIE,
- SmotriUserIE
+ SmotriUserIE,
+ IviCompilationIE,
+ ImdbListIE,
+ KhanAcademyIE,
)
self.assertEqual(result['id'], u'dezhurnyi_angel/season2')
self.assertEqual(result['title'], u'Дежурный ангел (2010 - 2012) 2 сезон')
self.assertTrue(len(result['entries']) >= 20)
+
+ def test_imdb_list(self):
+ dl = FakeYDL()
+ ie = ImdbListIE(dl)
+ result = ie.extract('http://www.imdb.com/list/sMjedvGDd8U')
+ self.assertIsPlaylist(result)
+ self.assertEqual(result['id'], u'sMjedvGDd8U')
+ self.assertEqual(result['title'], u'Animated and Family Films')
+ self.assertTrue(len(result['entries']) >= 48)
+
+ def test_khanacademy_topic(self):
+ dl = FakeYDL()
+ ie = KhanAcademyIE(dl)
+ result = ie.extract('https://www.khanacademy.org/math/applied-math/cryptography')
+ self.assertIsPlaylist(result)
+ self.assertEqual(result['id'], u'cryptography')
+ self.assertEqual(result['title'], u'Journey into cryptography')
+ self.assertEqual(result['description'], u'How have humans protected their secret messages through history? What has changed today?')
+ self.assertTrue(len(result['entries']) >= 3)
if __name__ == '__main__':