命令行实用程序,使用peerflix自动搜索电视和电影种子和流。
ezflix的Python项目详细描述
命令行实用程序,允许用户使用peerflix自动搜索电视和电影种子和流。
功能
- 从多个api中提取torrent数据。
- 提供高级搜索功能。按排序类型(下载计数,种子,喜欢),流派,最低评级筛选。
- 包括字幕支持,可自动下载所选电视节目或电影的字幕。
安装
ezflix可以在python包索引(pypi)上找到,地址是https://pypi.python.org/pypi/ezflix
您可以使用pip安装ezflix。
$ pip install ezflix
这个程序需要peerflix。您可以通过npm安装peerflix。
$ npm install -g peerflix
在将任何新更改推送到pypi之前,您可以克隆开发版本以使用任何新功能。
$ git clone https://github.com/AnthonyBloomer/ezflix.git $ cd ezflix $ virtualenv env $ source env/bin/activate $ pip install -r requirements.txt $ python setup.py install
支持的媒体播放器
下面是peerflix支持的媒体播放器列表。
- MPV
- 机场
- VLC
- MPlayer
- smplayer
- MPCHC
- Potplayer
- 网络游戏
- OMX
在ezflix中,默认播放器是mpv。如果找不到MPV,它将退回到VLC。
可以使用media_player参数设置媒体播放器。
cli用法
usage: ezflix [-h] [--limit [LIMIT]] [--minimum_rating [MINIMUM_RATING]] [--media_player [{mpv,vlc,mplayer,smplayer,mpchc,potplayer,webplay,omx,airplay}]] [--latest] [--subtitles] [--sort_by [{download_count,like_count,date_added,seeds,peers,rating,title,year}]] [--sort_order [{asc,desc}]] [--quality [{720p,1080p,3d}]] [--genre GENRE] [--remove] [--language LANGUAGE] [{movie,tv}] query positional arguments: {movie,tv} The media type. query The search query. optional arguments: -h, --help show this help message and exit --limit [LIMIT] The number of results to return. --minimum_rating [MINIMUM_RATING] Used to filter movie by a given minimum IMDb rating --media_player [{mpv,vlc,mplayer,smplayer,mpchc,potplayer,webplay,omx,airplay}] The media player. --latest Play the latest TV episode. --subtitles Load subtitles file. --sort_by [{download_count,like_count,date_added,seeds,peers,rating,title,year}] Use this argument to sort the torrents. --sort_order [{asc,desc}] Use this argument to set the sort order. --quality [{720p,1080p,3d}] Use this argument to set the min quality. --genre GENRE Used to filter by a given genre (See http://www.imdb.com/genre/ for full list) --remove Remove files on exit. --language LANGUAGE Language as IETF code. Set this argument to download subtitles in a given language.
一旦您获得返回的Torrent列表,这些选项将可用:
- 输入要传输的搜索结果的ID。这将开始在指定的媒体播放器中播放Torrent。
- 输入'quit'关闭程序。
- 输入“下一页”以查看电影的下一页。
- 输入“prev”可查看电影的上一页。
- 输入“search”以优化搜索。
- 输入“info”和Torrent的ID以获取电影/电视节目概述。
- 输入“trailer”和Torrent的ID以播放电影预告片。
示例
$ ezflix "The Man in the High Castle"
通过“最新”观看给定电视剧的最新一集。
$ ezflix "South Park" --latest
要搜索电影,请传递“movie”参数。
$ ezflix movie "Mad Max"
搜索2017年上映的电影,按降序排序。
$ ezflix movie '2017' --sort_by=like_count --sort_order=desc
搜索2017年发布的惊悚片,按下载次数递减排序。
$ ezflix movie '2017' --sort_by=download_count --sort_order=desc --genre=thriller
自动下载所选电视节目或电影的德语字幕。
$ ezflix movie 'Goodfellas' --subtitles --language=de
将质量参数传递到仅列出给定质量的种子。
$ ezflix movie 'They Live' --quality=720p
测试
python unittest模块包含自己的测试发现功能,您可以从命令行运行该功能:
$ python -m unittest discover tests/
编程用法
您可以在自己的应用程序中以编程方式使用ezflix。考虑以下示例:
fromezfliximportEzflix,peerflixezflix=Ezflix(query="Goodfellas",media_type='movie')torrents=ezflix.get_torrents()iflen(torrents)>0:fortorrentintorrents:print(torrent['title'])print(torrent['magnet'])first=torrents[0]file_path=ezflix.find_subtitles(first['title'])print(file_path)peerflix(magnet_link=first['magnet'],media_type='movie',media_player='mpv',subtitles=True,remove=True,file_path=file_path)
贡献
我们随时欢迎您提出关于如何改进此项目的请求和反馈!
公关指南
- 派生项目并在本地克隆。
- 为你要做的事情创建一个新的分支。
- 推送到原始存储库。
- 在github中创建一个新的pull请求。