Esempio n. 1
0
 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")
Esempio n. 2
0
 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")
Esempio n. 3
0
 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)
Esempio n. 4
0
 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")
Esempio n. 5
0
 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")
Esempio n. 6
0
 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)
Esempio n. 7
0
 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")
Esempio n. 8
0
 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")
Esempio n. 9
0
 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)