Python应用程序通过诱人的API观看YouTube视频,在终端!
invidious-viewer的Python项目详细描述
惹人讨厌的观众
安装
pip install --user invidious-viewer
安装git版本:
pip install --user -U git+https://github.com/git-bruh/invidious-viewer.git
将~/.local/bin
添加到PATH
中,方法是将以下内容添加到~/.bashrc
:
PATH=$HOME/.local/bin:$PATH
这将允许使用终端中的invidious
命令启动不受欢迎的查看器。在
使用
注:
MPV播放器是必需的,还有libmpv.so
,它应该由发行版的包管理器提供。在基于源代码的发行版上,可能还需要编译具有LuaJIT支持的MPV。在
默认行为: 返回输入的搜索项的第一页结果。在
其他使用选项:
usage: invidious_viewer.py [-h] [-i INSTANCE] [-r RESULTS] [-v]
[-u URL | -c CHANNEL | -p | -t]
optional arguments:
-h, --help show this help message and exit
-i INSTANCE, --instance INSTANCE
Specify a different invidious instance
-r RESULTS, --results RESULTS
Return specific number of results
-v, --video Toggle video playback
-u URL, --url URL Specify link or ID to play [Video/Playlist]
-c CHANNEL, --channel CHANNEL
View videos from a specific channel
-p, --popular View popular videos (Default invidious page)
-t, --trending View trending videos
配置文件:
^{pr2}$可以在配置文件中永久指定实例,以及“视频播放”和“闭路字幕”首选项。在
建议的替代实例是https://invidious.13ad.de,因为提供了所有必需的端点。在
使用示例:
invidious --channel "Channel Name" --instance https://invidious.snopyta.org --results 5
从指定通道返回前5个结果,并从Snopyta instance获取所有URL。在
截图
- 项目
标签: