diff options
| author | Philipp Hagemeister <phihag@phihag.de> | 2014-01-07 09:35:34 +0100 | 
|---|---|---|
| committer | Philipp Hagemeister <phihag@phihag.de> | 2014-01-07 09:35:34 +0100 | 
| commit | 3d3538e422a711aab238f4d1ab667d72cc9bbdbf (patch) | |
| tree | e268f0ce37ded1226eccf65d17dffb16cd9b01ee /test/test_playlists.py | |
| parent | 0cdad20c75d9bb4be2b5ea131baab18a45773ea8 (diff) | |
[khanacademy] Add support (Fixes #2066)
Diffstat (limited to 'test/test_playlists.py')
| -rw-r--r-- | test/test_playlists.py | 12 | 
1 files changed, 11 insertions, 1 deletions
diff --git a/test/test_playlists.py b/test/test_playlists.py index 9d522b357..3229823b6 100644 --- a/test/test_playlists.py +++ b/test/test_playlists.py @@ -1,7 +1,6 @@  #!/usr/bin/env python  # encoding: utf-8 -  # Allow direct execution  import os  import sys @@ -30,6 +29,7 @@ from youtube_dl.extractor import (      SmotriUserIE,      IviCompilationIE,      ImdbListIE, +    KhanAcademyIE,  ) @@ -198,6 +198,16 @@ class TestPlaylists(unittest.TestCase):          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__':      unittest.main()  | 
