[toypics] Separate user and video extraction (#2601)

This commit is contained in:
Philipp Hagemeister 2014-03-22 15:15:01 +01:00
parent 55442a7812
commit 231f76b530
3 changed files with 59 additions and 29 deletions

View file

@ -37,6 +37,7 @@ from youtube_dl.extractor import (
GoogleSearchIE,
GenericIE,
TEDIE,
ToypicsUserIE,
)
@ -269,5 +270,13 @@ class TestPlaylists(unittest.TestCase):
self.assertEqual(result['title'], 'Who are the hackers?')
self.assertTrue(len(result['entries']) >= 6)
def test_toypics_user(self):
dl = FakeYDL()
ie = ToypicsUserIE(dl)
result = ie.extract('http://videos.toypics.net/Mikey')
self.assertIsPlaylist(result)
self.assertEqual(result['id'], 'Mikey')
self.assertTrue(len(result['entries']) >= 17)
if __name__ == '__main__':
unittest.main()