def test_stream_info_youtube_video(self): stream = StreamInfo("https://www.youtube.com/watch?v=VZMfhtKa-wo", throw_ytdl_dl_errs=True) self.assertIn("https://", stream.video_url) self.assertEqual(stream.video_id, "VZMfhtKa-wo") self.assertTrue(stream.is_remote_file) self.assertEqual(stream.extractor, "youtube")
def test_stream_info_other_video(self): stream = StreamInfo( "https://www.twitch.tv/twitch/clip/MistySoftPenguinKappaPride") self.assertIn("https://", stream.video_url) self.assertEqual(stream.video_id, "944456168") self.assertTrue(stream.is_remote_file) self.assertEqual(stream.extractor, "twitch")
def test_stream_info_other_video(self): stream = StreamInfo( "http://www.bbc.com/travel/story/20170719-a-new-life-for-bermudas-shipwrecks" ) self.assertIn("https://", stream.video_url) self.assertFalse(stream.is_youtube_video) self.assertFalse(stream.is_youtube_playlist)
def test_stream_info_other_video(self): stream = StreamInfo( "https://clips.twitch.tv/CloudyEnticingChickpeaCeilingCat") self.assertIn("https://", stream.video_url) self.assertEqual(stream.video_id, "304482431") self.assertTrue(stream.is_remote_file) self.assertEqual(stream.extractor, "twitch")
def test_stream_info_other_video(self): stream = StreamInfo( "https://www.twitch.tv/buddha/clip/OutstandingSquareMallardBudStar" ) self.assertIn("https://", stream.video_url) self.assertEqual(stream.video_id, "471296669") self.assertTrue(stream.is_remote_file) self.assertEqual(stream.extractor, "twitch")
def test_stream_info_youtube_playlist(self): stream = StreamInfo( "https://www.youtube.com/playlist?list=PL9Z0stL3aRykWNoVQW96JFIkelka_93Sc" ) self.assertIsNone(stream.video_url) self.assertEqual(stream.playlist_id, "PL9Z0stL3aRykWNoVQW96JFIkelka_93Sc") self.assertTrue(stream.is_youtube_playlist)
def test_stream_info_youtube_playlist(self): stream = StreamInfo( "https://www.youtube.com/playlist?list=PL9Z0stL3aRykWNoVQW96JFIkelka_93Sc", throw_ytdl_dl_errs=True, ) self.assertIsNone(stream.video_url) self.assertEqual(stream.playlist_id, "PL9Z0stL3aRykWNoVQW96JFIkelka_93Sc") self.assertTrue(stream.is_playlist) self.assertEqual(stream.extractor, "youtube")
def test_stream_info_other_video(self): stream = StreamInfo("http://www.dailymotion.com/video/x6fotne") self.assertIn("https://", stream.video_url) self.assertEqual(stream.video_id, "x6fotne") self.assertTrue(stream.is_remote_file) self.assertEqual(stream.extractor, "dailymotion")
def test_stream_info_youtube_video(self): stream = StreamInfo("https://www.youtube.com/watch?v=VZMfhtKa-wo") self.assertIn("https://", stream.video_url) self.assertEqual(stream.video_id, "VZMfhtKa-wo") self.assertTrue(stream.is_youtube_video)