def get_list(url): downloader = get_downloader() ie_list = YoutubeUserIE(downloader=downloader) if not ie_list.suitable(url): ie_list = YoutubePlaylistIE(downloader=downloader) try: result = ie_list.extract(url) except ExtractorError: return [] return ["http://www.youtube.com/watch?v={0}".format(x["url"]) for x in result["entries"].getslice()]
def test_youtube_user(self): dl = FakeYDL() ie = YoutubeUserIE(dl) result = ie.extract('https://www.youtube.com/user/TheLinuxFoundation')[0] self.assertTrue(len(result['entries']) >= 320)
def test_youtube_user(self): dl = FakeYDL() ie = YoutubeUserIE(dl) result = ie.extract('https://www.youtube.com/user/TheLinuxFoundation') self.assertTrue(len(result['entries']) >= 320)