mirror of
				https://gitlab.com/ytdl-org/youtube-dl.git
				synced 2025-11-03 20:47:07 -05:00 
			
		
		
		
	[YoutubeDL] _calc_cookies: add get_header method to _PseudoRequest (#4861)
This commit is contained in:
		@@ -938,6 +938,9 @@ class YoutubeDL(object):
 | 
			
		||||
            def has_header(self, h):
 | 
			
		||||
                return h in self.headers
 | 
			
		||||
 | 
			
		||||
            def get_header(self, h, default=None):
 | 
			
		||||
                return self.headers.get(h, default)
 | 
			
		||||
 | 
			
		||||
        pr = _PseudoRequest(info_dict['url'])
 | 
			
		||||
        self.cookiejar.add_cookie_header(pr)
 | 
			
		||||
        return pr.headers.get('Cookie')
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user