1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 18:53:21 +01:00

[downloader:ytdl] forward cookies to youtube-dl

to be able to download private videos from Twitter, Instagram, etc.
This commit is contained in:
Mike Fährmann 2019-06-26 19:32:07 +02:00
parent 15e4ddf46d
commit f1b0c2bf5c
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -37,6 +37,9 @@ class YoutubeDLDownloader(DownloaderBase):
self.ytdl = YoutubeDL(options)
def download(self, url, pathfmt):
for cookie in self.session.cookies:
self.ytdl.cookiejar.set_cookie(cookie)
try:
info_dict = self.ytdl.extract_info(url[5:], download=False)
except Exception: