mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 06:35:12 +00:00 
			
		
		
		
	Update to ytdl-2021.01.08
This commit is contained in:
		| @@ -264,16 +264,24 @@ class TestNRKSubtitles(BaseTestSubtitles): | ||||
|  | ||||
|  | ||||
| class TestRaiPlaySubtitles(BaseTestSubtitles): | ||||
|     url = 'http://www.raiplay.it/video/2014/04/Report-del-07042014-cb27157f-9dd0-4aee-b788-b1f67643a391.html' | ||||
|     IE = RaiPlayIE | ||||
|  | ||||
|     def test_allsubtitles(self): | ||||
|     def test_subtitles_key(self): | ||||
|         self.url = 'http://www.raiplay.it/video/2014/04/Report-del-07042014-cb27157f-9dd0-4aee-b788-b1f67643a391.html' | ||||
|         self.DL.params['writesubtitles'] = True | ||||
|         self.DL.params['allsubtitles'] = True | ||||
|         subtitles = self.getSubtitles() | ||||
|         self.assertEqual(set(subtitles.keys()), set(['it'])) | ||||
|         self.assertEqual(md5(subtitles['it']), 'b1d90a98755126b61e667567a1f6680a') | ||||
|  | ||||
|     def test_subtitles_array_key(self): | ||||
|         self.url = 'https://www.raiplay.it/video/2020/12/Report---04-01-2021-2e90f1de-8eee-4de4-ac0e-78d21db5b600.html' | ||||
|         self.DL.params['writesubtitles'] = True | ||||
|         self.DL.params['allsubtitles'] = True | ||||
|         subtitles = self.getSubtitles() | ||||
|         self.assertEqual(set(subtitles.keys()), set(['it'])) | ||||
|         self.assertEqual(md5(subtitles['it']), '4b3264186fbb103508abe5311cfcb9cd') | ||||
|  | ||||
|  | ||||
| class TestVikiSubtitles(BaseTestSubtitles): | ||||
|     url = 'http://www.viki.com/videos/1060846v-punch-episode-18' | ||||
|   | ||||
| @@ -21,6 +21,7 @@ from youtube_dlc.utils import ( | ||||
|     encode_base_n, | ||||
|     caesar, | ||||
|     clean_html, | ||||
|     clean_podcast_url, | ||||
|     date_from_str, | ||||
|     DateRange, | ||||
|     detect_exe_version, | ||||
| @@ -1497,6 +1498,10 @@ Line 1 | ||||
|             iri_to_uri('http://导航.中国/'), | ||||
|             'http://xn--fet810g.xn--fiqs8s/') | ||||
|  | ||||
|     def test_clean_podcast_url(self): | ||||
|         self.assertEqual(clean_podcast_url('https://www.podtrac.com/pts/redirect.mp3/chtbl.com/track/5899E/traffic.megaphone.fm/HSW7835899191.mp3'), 'https://traffic.megaphone.fm/HSW7835899191.mp3') | ||||
|         self.assertEqual(clean_podcast_url('https://play.podtrac.com/npr-344098539/edge1.pod.npr.org/anon.npr-podcasts/podcast/npr/waitwait/2020/10/20201003_waitwait_wwdtmpodcast201003-015621a5-f035-4eca-a9a1-7c118d90bc3c.mp3'), 'https://edge1.pod.npr.org/anon.npr-podcasts/podcast/npr/waitwait/2020/10/20201003_waitwait_wwdtmpodcast201003-015621a5-f035-4eca-a9a1-7c118d90bc3c.mp3') | ||||
|  | ||||
|  | ||||
| if __name__ == '__main__': | ||||
|     unittest.main() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 pukkandan
					pukkandan