youtube dl的轻量级包装
yt-helper的Python项目详细描述
安装
安装系统AV工具
% sudo apt-get install -y sox rtmpdump % sudo apt-get install -y libav-tools % [[ $? -ne 0 ]] && sudo apt-get install -y ffmpeg or % brew install libav sox rtmpdump
使用pip
安装% pip3 install yt-helper
用法
提供了yt-download脚本
% venv/bin/yt-download --help Usage: yt-download [OPTIONS] [ARGS]... Wrapper to 'av_from_url' - args: urls or filenames containing urls Options: -o, --template TEXT string representing generated filenames -h, --max-height INTEGER maximum height of video (i.e. 1080, 720, 480, 240.. default 720) -p, --playlist Allow downloading entire playlist -t, --thumbnail Download thumbnail image of video -d, --description Download description of video to a file -s, --subtitles Embed subtitles in the downloaded video -a, --audio-only Don't keep the video file if one was downloaded -m, --mp3 Convert downloaded audio to MP3 file --help Show this message and exit.
可选安装
集合/模型(查询、url、文件、注释)
为了利用QUERIES、URLS、FILES和 COMMENTS集合,还必须安装redis-helper 打包并运行redis服务器。
如果集合/模型可用,一些函数将保存 相关信息。
See: https://github.com/kenjyco/redis-helper#intro
安装redis并启动服务器
% sudo apt-get install -y redis-server or % brew install redis@3.2 % brew services start redis@3.2
使用pip
安装% pip3 install redis-helper