mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 14:45:14 +00:00 
			
		
		
		
	[youtube] Extract even more thumbnails and reduce testing
* Also fix bug where `_test_url` was being ignored Ref: https://stackoverflow.com/a/20542029 Related: #340
This commit is contained in:
		| @@ -1949,12 +1949,15 @@ class YoutubeDL(object): | ||||
|  | ||||
|             def thumbnail_tester(): | ||||
|                 if self.params.get('check_formats'): | ||||
|                     def to_screen(msg): | ||||
|                         return self.to_screen(f'[info] {msg}') | ||||
|                     test_all = True | ||||
|                     to_screen = lambda msg: self.to_screen(f'[info] {msg}') | ||||
|                 else: | ||||
|                     test_all = False | ||||
|                     to_screen = self.write_debug | ||||
|  | ||||
|                 def test_thumbnail(t): | ||||
|                     if not test_all and not t.get('_test_url'): | ||||
|                         return True | ||||
|                     to_screen('Testing thumbnail %s' % t['id']) | ||||
|                     try: | ||||
|                         self.urlopen(HEADRequest(t['url'])) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 pukkandan
					pukkandan