youtubedl播放列表的订阅包装

ytcc的Python项目详细描述


ytcc公司

Build and test

命令行工具,跟踪你最喜欢的播放列表在YouTube和许多其他地方。在

Version 2.0.0已过期! 在升级到2.0.0或更高版本之前,请阅读the migration guide! 如果要查找旧版本,请检查Release页面和v1 branch。在

安装

pip install ytcc

替代安装方法在documentation中描述。在

从版本1迁移

migration guide

使用

“订阅”播放列表。在

^{pr2}$

从YouTube的subscription manager导出导入订阅。在

ytcc import ~/Downloads/subscription_manager

获取新视频的元数据。在

ytcc update

列出不匹配的视频。在

ytcc list

以JSON格式列出播放列表内容。在

ytcc --output json list --playlist "NCS: House" --since 2020-07-07 --watched

启动交互式终端界面。在

ytcc tui

将播放列表中的所有视频标记为已观看而不播放。在

ytcc ls -p "Jupiter Broadcasting"| ytcc mark

听一些没有限制的音乐。在

ytcc ls -p "NCS: House"| ytcc play --audio-only

基于fzf构建的可选终端接口。 需要fzf 0.23.1或更高版本。 在安装ytcc期间,脚本会自动安装在大多数平台上。 如果没有安装,可以从here下载。在

ytccf.sh

# Show help and key bindings
ytccf.sh --help

配置

Ytcc在以下位置搜索配置文件:

  1. $XDG_CONFIG_HOME/ytcc/ytcc.conf
  2. ~/.config/ytcc/ytcc.conf
  3. ~/.ytcc.conf

如果在这三个位置找不到配置文件,则在~/.config/ytcc/ytcc.conf处创建一个默认配置文件。在

示例配置

[ytcc]# Directory where downloads are saved, when --path is not givendownload_dir=~/Downloads# Parameters passed to mpv. Adjusting these might break video playback in ytcc!mpv_flags=--ytdl --ytdl-format=bestvideo[height<=?1080]+bestaudio/best# Defines the order of video listings.# Possible options: id, url, title, description, publish_date, watched, duration, extractor_hash,# playlists. Every option must be suffixed with :desc or :asc for descending or ascending sort.order_by=playlists:asc, publish_date:desc# Default attributes shown in video listings.# Some ytcc commands allow overriding the default set here in the config.video_attrs=id, title, publish_date, duration, playlists# Default attributes shown in playlist/subscription listings.# Some ytcc commands allow overriding the default set here in the config.playlist_attrs=name, url, tags# Path where the database is stored.# Can be used to sync the database between multiple machines.db_path=~/.local/share/ytcc/ytcc.db# The format of used to print datesdate_format=%Y-%m-%d# Default failure threshold before a video is ignored.# When a video could not be updated repeatedly, it will be ignored by ytcc after `max_update_fail`# attempts. This setting can be overridden with the --max-fail commandline parameter.max_update_fail=5# Default update backlog.# The update command will only the first `max_update_backlog` videos of a playlist to improve# performance. This setting can be overridden with the --max-backlog commandline parameter.max_update_backlog=20# Ignore videos that have an age limit higher than the one specified here.age_limit=0# Prompt and table colors. Supports 256 colors. Hence, values between 0-255 are allowed.# See https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit for the color codes.[theme]prompt_download_audio=2prompt_download_video=4prompt_play_audio=2prompt_play_video=4prompt_mark_watched=1table_alternate_background=245[tui]# The characters to use for selecting videos in interactive mode.alphabet=sdfervghnuiojkl# Default action of interactive mode.# Possible options: play_video, play_audio, mark_watched, download_audio, download_videodefault_action=play_video[youtube_dl]merge_output_format=mkv# Format (see FORMAT SELECTION in youtube-dl manpage). Make sure to use a video format here, if you# want to be able to download videos.format=bestvideo[height<=?1080]+bestaudio/best# Output template (see OUTPUT TEMPLATE in youtube-dl manpage)outputtemplate=%(title)s.%(ext)s# If a merge is required according to format selection, merge to the given container format.# One of mkv, mp4, ogg, webm, flvmergeoutputformat=mkv# Loglevel options: quiet, normal, verboseloglevel=normal# Limit download speed to the given bytes/second. Set 0 for no limit.# E.g. limit to one megabyte per second#ratelimit = 1000000ratelimit=0# Set number of retries before giving up on a download.# Set 0 for no retries.retries=0# Subtitles for videos. If enabled and available, automatic and manual subtitles for selected# languages are embedded in the video.#subtitles = en,desubtitles=off# Embed the youtube thumbnail in audio downloads. Transforms the resulting file to m4a, if# enabled.thumbnail=on# Skips livestreams in download commandskip_live_stream=true

报告问题

GitHub issue tracker上创建新问题。 尽可能详细地描述问题,如果可能,请使用问题模板! Important:不要忘记在错误报告中包含ytcc bug-report的输出。 使用--loglevel debug选项运行ytcc并将输出包含在报告中也可能会有很大帮助。在

发展

我们建议在virtualenv中开发。在

  1. 设置virtualenv
  2. 安装开发依赖项:pip install -r devrequirements.txt

在每次拉取请求之前运行以下命令,并修复它们产生的警告或错误。在

mypy ytcc
pytest
pylint ytcc
pydocstyle ytcc

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java操作数组上的字符串   java JAXB内容未实例化   图形在Java中如何绘制垂直居中的字符串?   java Apache Ant:使用Junit时出现NoClassDefFoundError   java无法从服务器上运行perl脚本   如何在java中沿树进行预排序遍历,并打印0和1以对应每个节点上的特定字符?   java如何创建。p12文件?   java线程访问无效   java只匹配命名空间中的XML节点,而不知道NS前缀   从java获取2d arraylist元素   数组Java动态集合对象   java Xpath通过通配符或布尔运算查找以相同名称开头的节点?   java注释元素类型   java在中看不到Super()。反编译后的类文件