CLI工具/客户端库扭曲.moe

twistdl的Python项目详细描述


在扭曲。莫伊下载程序帮助程序

说明

Build StatusDownloadsPyPI version

这是一个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指定范围将提示您 到输入范围。如果没有范围,所有的剧集将被下载。在

^{pr2}$

使用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在某种程度上,它会破坏这个工具的功能。在

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

推荐PyPI第三方库


热门话题
带有字符串的java JNA调用与带有字节[]的java JNA调用的行为不同   java基于键列表获取子映射   重启后永久增加java堆大小?   JavaHTTPS服务器:相互SSL身份验证   java为什么接受接口的方法会拒绝该接口的实现?   片段中的java视图无法应用于()   ms access Java SQL更新命令不工作   java将web服务自动打包和部署到Oracle Application Server 10g   java有没有办法在安卓 studio中为安卓时钟设置多个警报?   位于FTP服务器上的文件上的Java校验和md5   在Java中创建类时遇到问题。有些方法不太确定   java错误:在类chrome\u驱动程序中找不到主方法   通用海图(Javascript\Java)