how to archive the internet for personal usage __ __ __ .---.-.----.----.| |--.|__|.--.--.---.-.| | | _ | _| __|| || || | | _ || | |___._|__| |____||__|__||__| \___/|___._||__| youtube ======= windows 11 set up ------ ```ps1 winget install -e DenoLand.Deno winget install -e yt-dlp.FFmpeg curl -LO https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe # note: the official yt-dlp comes with the required ejs challenge solver provided you use Deno as your ejs runtime. ``` downloading a single video -------------------------- by default yt-dlp will want to download to webm, to save as mp4 use the following ```ps1 yt-dlp -S "ext:mp4:m4a" -o "%(playlist_index)s.%(title)s.%(ext)s" "VIDEO URL" ``` downloading playlists --------------------- ```ps1 yt-dlp -o "%(playlist_title)s/%(title)s.%(ext)s" "PLAYLIST URL" ``` this will create a directory with the playlist title and store each video in this directory. tip: if you need to download private playlist try using cookies from your browser. firefox is recommended as there are some issues with using chrome/edge. ```ps1 yt-dlp --cookies-from-browser firefox "PLAYLIST URL" ``` bonus: copilot instructions --------------------------- i'm experimenting with a way to use an agent to help build yt-dlp commands based on your requirements. i've done this by defining a set of rules that the agent must follow. to use this in vscode create an empty repo and store this instuction file in `.github/copilot-instructions.md`. you can probably use this with the copilot cli, but for anything else you're on your own. ```md When creating a command line for yt-dlp.exe, always: - use the [README.md](.https://github.com/yt-dlp/yt-dlp/blob/master/README.md) as a reference for the correct syntax and options. - if you need more information you may reference the official [wiki](https://github.com/yt-dlp/yt-dlp/wiki) - ensure that the command is properly formatted and will work for PowerShell in Windows Terminal. - explain why you have used the specific options - if you are unsure about the correct syntax or options, ask for clarification before providing the command. ```