mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-11-04 08:35:12 +00:00 
			
		
		
		
	Using internal opener
This commit is contained in:
		@@ -1994,9 +1994,6 @@ class YoutubeDL(object):
 | 
				
			|||||||
            encoding = preferredencoding()
 | 
					            encoding = preferredencoding()
 | 
				
			||||||
        return encoding
 | 
					        return encoding
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def get_opener(self):
 | 
					 | 
				
			||||||
        return self._opener
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    def _write_thumbnails(self, info_dict, filename):
 | 
					    def _write_thumbnails(self, info_dict, filename):
 | 
				
			||||||
        if self.params.get('writethumbnail', False):
 | 
					        if self.params.get('writethumbnail', False):
 | 
				
			||||||
            thumbnails = info_dict.get('thumbnails')
 | 
					            thumbnails = info_dict.get('thumbnails')
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -377,7 +377,7 @@ def _real_main(argv=None):
 | 
				
			|||||||
    with YoutubeDL(ydl_opts) as ydl:
 | 
					    with YoutubeDL(ydl_opts) as ydl:
 | 
				
			||||||
        # Update version
 | 
					        # Update version
 | 
				
			||||||
        if opts.update_self:
 | 
					        if opts.update_self:
 | 
				
			||||||
            update_self(ydl.to_screen, opts.verbose, ydl.get_opener())
 | 
					            update_self(ydl.to_screen, opts.verbose, ydl._opener)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Remove cache dir
 | 
					        # Remove cache dir
 | 
				
			||||||
        if opts.rm_cachedir:
 | 
					        if opts.rm_cachedir:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user