feat: YouTube downloader cookie support, JS runtime, 720p limit#407
Open
fivedang wants to merge 1 commit into
Open
feat: YouTube downloader cookie support, JS runtime, 720p limit#407fivedang wants to merge 1 commit into
fivedang wants to merge 1 commit into
Conversation
Three enhancements to YoutubeDownloader: 1. Cookie support — integrate CookieConfigManager to read YouTube cookies from the settings page (supports both Netscape format from browser extensions and key=value format), writes cookiefile for yt-dlp 2. JS challenge solver — add js_runtimes and remote_components to ydl_opts so yt-dlp can solve YouTube's nsig/PO Token challenges. Requires Node.js 22 installed in the Docker image 3. 720p video limit — add max_height=720 parameter to download_video() for screenshot use cases, reducing file size significantly Dockerfile.complete updated to install Node.js 22 and upgrade yt-dlp.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three enhancements to
YoutubeDownloaderfor the Docker single-image deployment:1. Cookie Support
The YouTube downloader previously ignored cookies configured in the settings page. This PR integrates
CookieConfigManager(same pattern asBilibiliDownloader) to:config/downloader.json)2. JavaScript Challenge Solver
yt-dlp 2026+ requires a JavaScript runtime to solve YouTube's
nchallenge (nsig) and PO Token challenges. Previously, the container had no JS runtime, causing "n challenge solving failed" errors.js_runtimes: {"node": {}}andremote_components: ["ejs:github"]to ydl_opts3. 720p Video Download Limit
download_video()previously usedbestvideo[ext=mp4](up to 4K). For screenshot extraction, 720p is sufficient and reduces file size by 5-10x.max_height: int = 720parameter with corresponding yt-dlp format stringRelated