[downloader:ytdl] forward cookies to youtube-dl

to be able to download private videos from Twitter, Instagram, etc.
pull/359/head
Mike Fährmann 5 years ago
parent 15e4ddf46d
commit f1b0c2bf5c
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -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:

Loading…
Cancel
Save