CLI工具/客户端库扭曲.moe
twistdl的Python项目详细描述
在扭曲。莫伊下载程序帮助程序
说明
这是一个pythoncli工具和客户端,用于下载本地网站twist.moe
上提供的系列视频内容。
要下载特定的系列,请通过输入名称的一部分来搜索序列,如twistdl fate
,或者直接使用序列的url字符串,即twistdl https://twist.moe/a/made-in-abyss
。在
除了命令行接口之外,这个包还为twist.moe
提供了一个小的python面向对象api。在
记住支持扭曲.moe如果可以的话,你可以捐赠,因为他们在运营他们的网站方面做得很好!在
安装
这些脚本已经在python2.7和3.7上进行了测试。在
pip install twistdl --user
你完了!您可以从下面的命令开始。在
$ twistdl fate
运行脚本
$ twistdl usage: twistdl [title][--range RANGE][--directory DIRECTORY][-h] Twist-dl is a small python tool for downloading video contents of series available on the website twist.moe locally! To download a list of particular series, enter a keyword of the series name. i.e. 'code geass' can be found by simply entering 'code'. positional arguments: title To download a particular series, use the series's url like so "https://twist.moe/a/made-in-abyss" and to search for a series enter a part of its name as found in a twist.moe's url string like "fate". optional arguments: -h, --help show this help message and exit --directory DIRECTORY Directory path to save downloaded contents --range RANGE Range of episodes to download. i.e. --range=1-24 or for a single episode --range=1
用法示例:
使用CLI搜索和下载
通过传递搜索中找到的系列标题进行下载。不使用--range
指定范围将提示您
到输入范围。如果没有范围,所有的剧集将被下载。在
使用API搜索和下载
frompathlibimportPathfromtwistdlimportTwistDL# Credentials can be supplied incase they expire. (good luck acquiring them though....)client=TwistDL()animes=client.search_animes(title='code geass')foranimeinanimes:forepisodeinanime.episodes:file=Path(f'anime/{anime.slug_name}/{anime.title} - {episode.number}')print(f'{anime.title} - {episode.number}')file.parent.mkdir(exist_ok=True,parents=True)episode.download(file)
免责声明
在你的国家,下载有版权的视频可能是非法的。此工具仅用于教育目的。上游变化扭曲.moe在某种程度上,它会破坏这个工具的功能。在
- 项目
标签: