[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

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: