def test_capture_should_return_output_path(self):
     with tempfile.TemporaryDirectory() as temp_dir:
         output = '%s/out.jpg' % (temp_dir)
         ret = pylivecap.capture(YOUTUBE_PTS_LIVESTREAM, output, VQ.Q1080)
         self.assertEqual(ret, output)
Пример #2
0
 def bench_capture():
     with tempfile.TemporaryDirectory() as temp_dir:
         output = '%s/out.jpg' % (temp_dir)
         pylivecap.capture(YOUTUBE_VIDEO, output)
 def test_capture_1080p_with_png_format_from_youtube_livestream_should_success(
         self):
     with tempfile.TemporaryDirectory() as temp_dir:
         output = '%s/out.png' % (temp_dir)
         pylivecap.capture(YOUTUBE_PTS_LIVESTREAM, output, VQ.Q1080)
         self.assertEqual(imghdr.what(output), 'png')