ytget — yt-dlp wrapper#
Site-aware, multi-URL, retrying downloader with a Rose Pine progress bar.
Lands in ~/Downloads, remembers what it already grabbed.
Usage#
ytget URL— one video, best quality, browser cookies, into~/Downloads.ytget URL URL URL— batch. Duplicates dropped, order kept,[i/n]tag per item.- Failed URLs get 2 extra passes (
--retries N) and are listed again at the end. - Exit status is 1 if anything failed, so
ytget ... && notifyworks.
Media — quality & container#
-f best(default) ·1080·720·audio— quality cap.-e mp4|webm|mkv— pin the video container (merge + remux).-e mp3|m4a|opus— audio only, extracted and converted.ytget -f audio -e mp3 URL— music rip.ytget -f 720 -e mp4 URL— small + portable.
Playlists & output#
--playlist— follow the list/mix onwatch?v=…&list=…URLs. Off by default: such a URL grabs just the one video.- A
/playlist?list=…URL is all-playlist by definition — it downloads everything either way (yt-dlp ignores--no-playlistthere). - Unavailable videos don't loop it: a playlist run with some dead/private videos
finishes the rest, reports
⚠ playlist done · N video error(s), and is counted OK — no client rotation, no retry passes over the whole list. -d ~/Music— download directory.-o '%(title)s.%(ext)s'— filename template.- Default template is
%(title)s [%(id)s].%(ext)s— keep the[%(id)s], the archive prune needs it.
Embeds — referer-gated video (Vimeo etc.)#
-r URL/--referer URL— send Referer header. Embed-only Vimeo (player.vimeo.com/video/…) checks it against the embedding site's whitelist.- Pass the page that embeds the player, not the player URL:
ytget -e mp4 -r 'https://www.dearkellyfilm.com/' 'https://player.vimeo.com/video/1047185495' - On a failed embed download without
-r, ytget prints a hint reminding you.
Metadata — print instead of download#
--print FIELD— print a metadata field to stdout and exit, no download. Repeatable.ytget --print channel_id 'https://www.youtube.com/@KittiMinx'→UCP97MCbfkG4CiZlAXrzl2wQ- Works on video URLs too:
ytget --print channel_id --print title URL— one line per field. - On channel/playlist pages it reads playlist-level metadata in one request
(raw yt-dlp would crawl every video). Useful fields:
channel_id,id,title,uploader,channel,webpage_url,playlist_count. - Stdout is data only — pipe it:
ytget --print channel_id URL | pbcopy.
Cookies & YouTube blocks#
- Cookies come live from Safari by default — nothing goes stale.
--browser chrome/--browser firefox— pull from another browser.--cookies file.txt— use an exported cookie file instead.- On YouTube failure it rotates clients by itself:
default → web_safari → ios → android. --client ios— pin one client. Rotation stops early onSign in to confirm(dead cookies — refresh the browser session, another client won't help).
Archive & history — skip what you have#
- Every success is recorded in
.ytget-archive.txtinside the download dir. - Re-running a batch skips finished items and marks them
↷ already have. - Entries whose file you deleted are pruned automatically, so it downloads again.
--no-archive— ignore the record and fetch it again anyway.
Look & escape hatches#
--theme dawn|dark— Rose Pine variant (auto from$YTGET_THEME/$COLORFGBG).--raw— plain yt-dlp output, no UI. Use it when a download misbehaves.- Unknown flags pass straight to yt-dlp:
ytget --write-subs --sub-langs en URL,ytget --sponsorblock-remove sponsor URL,ytget --download-sections '*0-90' URL.
Needs
yt-dlpon PATH (brew install yt-dlp). Full flags:ytget -h.