Explorar o código

[YoutubeDL._calc_cookies] Restore the 'has_header' method

I didn't copied it from downloader/external
Jaime Marquínez Ferrándiz %!s(int64=10) %!d(string=hai) anos
pai
achega
4b405cfc6e
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      youtube_dl/YoutubeDL.py

+ 3 - 0
youtube_dl/YoutubeDL.py

@@ -892,6 +892,9 @@ class YoutubeDL(object):
             def get_full_url(self):
                 return self.url
 
+            def has_header(self, h):
+                return h in self.headers
+
         pr = _PseudoRequest(info_dict['url'])
         self.cookiejar.add_cookie_header(pr)
         return pr.headers.get('Cookie')