mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[YoutubeDL] _calc_cookies: add get_header method to _PseudoRequest (#4861)
This commit is contained in:
parent
467d3c9a0c
commit
b3a286d69d
1 changed files with 3 additions and 0 deletions
|
@ -938,6 +938,9 @@ def is_unverifiable(self):
|
|||
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')
|
||||
|
|
Loading…
Reference in a new issue