<h1 align="center" style="font-size: 4rem">Animag 2.0</h1>
<p align="center">
<a href="https://pypi.org/project/animag/">
<img src="https://img.shields.io/pypi/v/animag?style=for-the-badge" alt="PyPI">
</a>
<a href="https://github.com/adogecheems/animag/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/adogecheems/animag?style=for-the-badge" alt="License">
</a>
<a href="https://pypi.org/project/animag/">
<img src="https://img.shields.io/pypi/dm/animag?style=for-the-badge" alt="Downloads">
</a>
</p>
<p align="center">
<a href="https://github.com/adogecheems/animag/blob/master/README_en.md">English Version</a>
</p>
---
## 项目概述
一个用于搜索动漫磁力链接与种子的Python库,拥有强大的可扩展性。
支持通过插件系统从不同来源搜索动画资源,并能够处理磁力链接、文件大小转换等功能。
使用过旧版本的用户注意,项目名称发生了改变,请务必重新安装。同时由于2.0版本的重构,部分API可能发生变化,建议查看文档。
## 主要特性
- 支持多个资源站点的搜索功能
- 可扩展的插件系统
- 文件大小单位转换
- CSV导出功能
- 磁力链接处理
- 时间格式转换
- 错误处理机制
## 安装
Animag可以使用pip轻松地安装:
```commandline
pip install animag
```
## 使用示例
```python
# 导入搜索器类
from animag import Searcher
# 创建搜索器实例
searcher = Searcher(plugin_name='dmhy',
no_search_errors=True)
# 搜索动画(代理仅作为演示)
searcher.search("葬送的芙莉莲",
collected=True,
proxies={'http': 'http://localhost:6666',
'https': 'http://localhost:6666'})
# 打印搜索结果
print(searcher.get_animes())
"""
示例输出(2024年12月22日的结果):
Search completed successfully: 葬送的芙莉莲
[Anime(time='2024/10/20 12:23', title='[7³ACG\u200b] \u200b葬送的芙莉莲/Sousou no Frieren S01 | 01-28 [简繁字幕] BDrip 1080p AV1 OPUS 2.0\u200b\u200b\u200b', size='17.1GB', magnet='magnet:?xt=urn:btih:...
"""
# 转换所有结果的文件大小为GB
searcher.size_format_all('MB')
# 保存结果到CSV文件
searcher.save_csv("search_results.csv")
```
## 支持的插件
| 站点 | 插件参数名称 | 速度 | 季度全集搜索 | size | magnet | torrent | 注意事项 |
|:-------------------:|:--------------:|:--:|:------:|:----:|:------:|:-------:|:-------------------------------------------------------:|
| dmhy.org | dmhy | 适中 | ✅ | ✅ | ✅ | ❎ | 无 |
| dmhy.org | dmhy_rss | 极快 | ❎ | ❎ | ✅ | ❎ | 无 |
| nyaa.si | nyaa | 极快 | ❎ | ✅ | ✅ | ✅ | 无 |
| nyaa.si | nyaa_rss | 极快 | ❎ | ✅ | ✅ | ✅ | 无 |
| acg.rip | acgrip | 适中 | ❎ | ✅ | ❎ | ✅ | 无 |
| acg.rip | acgrip_rss | 较慢 | ❎ | ❎ | ❎ | ✅ | 设置的最大搜索页数是5页,因为多了会被服务器阻断<br/>可以自行修改模块的`MAX_PAGE`,不建议超过9 |
| www.tokyotosho.info | tokyotosho | 适中 | ❎ | ✅ | ✅ | ✅ | 需要英文/日文搜索 |
| www.tokyotosho.info | tokyotosho_rss | 较快 | ❎ | ✅ | ✅ | ✅ | 需要英文/日文搜索 |
| animetosho.org | animetosho | 快 | ❎ | ✅ | ✅ | ✅ | 需要英文搜索 |
| animetosho.org | animetosho_rss | 快 | ❎ | ✅ | ✅ | ✅ | 需要英文搜索 |
以上所有插件都需要代理才能正常工作,确保正确配置代理设置
## 配置选项
### 搜索器初始化选项
- `plugin_name`: 插件名称,默认:'dmhy'
- `parser`: 解析器选项,RSS插件无需提供,默认:'lxml'
- `verify`: 验证选项,是否验证SSL证书,默认:True
- `timefmt`: 时间格式,默认:'%Y/%m/%d %H:%M'
- `no_search_errors`: 是否忽略搜索错误,默认:False
### 搜索选项
- `keyword`: 搜索关键词
- `collected`: 是否收集结果
- `proxies`: 代理设置
- `system_proxy`: 是否使用系统代理
- `**extra_options`: 额外选项,会并入搜索时的查询字符串
## 核心组件
### Anime类
`Anime`类用于表示单个动画资源的信息
#### 主要属性
- `time`: 发布时间
- `title`: 标题
- `size`: 文件大小
- `magnet`: 磁力链接
- `torrent`: 种子链接
- `hash`: 磁力链接的哈希值,如果不存在magnet则其不存在
#### 主要方法
- `size_format()`: 转换文件大小单位
- `set_timefmt()`: 转换时间格式
### Searcher类
`Searcher`类是搜索功能的核心实现
#### 主要功能
- 初始化搜索插件
- 执行搜索操作
- 处理搜索结果
- 导出数据
#### 主要方法
- `search()`: 搜索动画资源
- `get_anime()`: 获取单个动画资源
- `get_animes()`: 获取所有动画资源
- `size_format_all()`: 批量转换文件大小单位
- `save_csv()`: 将搜索结果保存为CSV文件
- `set_timefmt()`: 设置时间格式
### 错误处理
库定义了多种错误类型:
- `PluginImportError`: 插件导入错误
- `SearchRequestError`: 搜索请求错误
- `SearchParseError`: 搜索结果解析错误
- `SizeFormatError`: 文件大小格式化错误
- `TimeFormatError`: 时间格式化错误
- `HashExtractError`: 磁力链接哈希提取错误
- `SaveCSVError`: CSV保存错误
## 自定义插件
Animag支持安装自己实现的搜索插件,插件类必须继承`BasePlugin`类,并实现`search()`方法。
### 示例插件
```python
# myplugin.py
# 文件名必须是小写的插件名称
from animag import BasePlugin, Anime
from typing import List, Optional
class MyPlugin(BasePlugin):
abstract = False # 这一行必须设置,否则不会被识别为插件
def __init__(self,
parser: Optional[str] = None,
verify: Optional[bool] = None,
timefmt: Optional[str] = None):
# 插件初始化
pass
def search(self, keyword: str,
collected: Optional[bool] = None,
proxies: Optional[dict] = None,
system_proxy: Optional[bool] = None,
**extra_options) -> List[Anime] | None:
# 实现搜索逻辑
pass
```
### 安装插件
将自定义插件安装到animag/plugins目录后,在搜索器初始化时,指定插件名称为`myplugin`即可,如果没有安装至此目录,也可以手动将模块导入至命名空间。
```python
from animag import Searcher
searcher = Searcher(plugin_name='myplugin')
```
或者是直接导入插件模块
```python
import myplugin
from animag import Searcher
searcher = Searcher(plugin_name='myplugin')
```
## 命令行接口 (CLI)
项目附赠了一个CLI工具,使用 Rich 库实现美观的控制台输出,支持交互式选择。
### 命令行参数
```commandline
animag [-h] -s SEARCH [-p PLUGIN] [-c]
```
#### 必选参数
-s, --search: 搜索关键词
#### 可选参数
- `-h`, `--help`: 显示帮助信息
- `-p`, `--plugin`: 指定搜索插件(默认:'dmhy')
- `-c`, `--collected`: 启用季度全集搜索模式
### 使用示例
```commandline
# 基本搜索
animag -s "葬送的芙莉莲"
# 使用特定插件搜索
animag -s "葬送的芙莉莲" -p nyaa
# 搜索季度全集
animag -s "葬送的芙莉莲" -c
```
## 注意事项
1. 目前所有的插件都需要代理才能工作,确保正确配置代理设置
2. 时间格式必须符合Python的时间格式字符串规范
Raw data
{
"_id": null,
"home_page": "https://github.com/adogecheems/animag",
"name": "animag",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "plugin rss torrent scraper scalable scalability magnet-link torrents magnet animes nyaa-magnet-links nyaa anime-scraper dmhy nyaa-si animetosho tokyotoshokan acgrip dmhy-org acg-rip",
"author": "adogecheems",
"author_email": "master@mmoe.work",
"download_url": "https://files.pythonhosted.org/packages/a0/12/667ec0b5332b1a9abd806fef4ad1baa90a3999b9d4a747d0116687560b7e/animag-2.1.1.tar.gz",
"platform": null,
"description": "<h1 align=\"center\" style=\"font-size: 4rem\">Animag 2.0</h1>\n\n<p align=\"center\">\n <a href=\"https://pypi.org/project/animag/\">\n <img src=\"https://img.shields.io/pypi/v/animag?style=for-the-badge\" alt=\"PyPI\">\n </a>\n <a href=\"https://github.com/adogecheems/animag/blob/master/LICENSE\">\n <img src=\"https://img.shields.io/github/license/adogecheems/animag?style=for-the-badge\" alt=\"License\">\n </a>\n <a href=\"https://pypi.org/project/animag/\">\n <img src=\"https://img.shields.io/pypi/dm/animag?style=for-the-badge\" alt=\"Downloads\">\n </a>\n</p>\n<p align=\"center\">\n <a href=\"https://github.com/adogecheems/animag/blob/master/README_en.md\">English Version</a>\n</p>\n\n---\n\n## \u9879\u76ee\u6982\u8ff0\n\n\u4e00\u4e2a\u7528\u4e8e\u641c\u7d22\u52a8\u6f2b\u78c1\u529b\u94fe\u63a5\u4e0e\u79cd\u5b50\u7684Python\u5e93\uff0c\u62e5\u6709\u5f3a\u5927\u7684\u53ef\u6269\u5c55\u6027\u3002\n\n\u652f\u6301\u901a\u8fc7\u63d2\u4ef6\u7cfb\u7edf\u4ece\u4e0d\u540c\u6765\u6e90\u641c\u7d22\u52a8\u753b\u8d44\u6e90\uff0c\u5e76\u80fd\u591f\u5904\u7406\u78c1\u529b\u94fe\u63a5\u3001\u6587\u4ef6\u5927\u5c0f\u8f6c\u6362\u7b49\u529f\u80fd\u3002\n\n\u4f7f\u7528\u8fc7\u65e7\u7248\u672c\u7684\u7528\u6237\u6ce8\u610f\uff0c\u9879\u76ee\u540d\u79f0\u53d1\u751f\u4e86\u6539\u53d8\uff0c\u8bf7\u52a1\u5fc5\u91cd\u65b0\u5b89\u88c5\u3002\u540c\u65f6\u7531\u4e8e2.0\u7248\u672c\u7684\u91cd\u6784\uff0c\u90e8\u5206API\u53ef\u80fd\u53d1\u751f\u53d8\u5316\uff0c\u5efa\u8bae\u67e5\u770b\u6587\u6863\u3002\n\n## \u4e3b\u8981\u7279\u6027\n\n- \u652f\u6301\u591a\u4e2a\u8d44\u6e90\u7ad9\u70b9\u7684\u641c\u7d22\u529f\u80fd\n- \u53ef\u6269\u5c55\u7684\u63d2\u4ef6\u7cfb\u7edf\n- \u6587\u4ef6\u5927\u5c0f\u5355\u4f4d\u8f6c\u6362\n- CSV\u5bfc\u51fa\u529f\u80fd\n- \u78c1\u529b\u94fe\u63a5\u5904\u7406\n- \u65f6\u95f4\u683c\u5f0f\u8f6c\u6362\n- \u9519\u8bef\u5904\u7406\u673a\u5236\n\n## \u5b89\u88c5\n\nAnimag\u53ef\u4ee5\u4f7f\u7528pip\u8f7b\u677e\u5730\u5b89\u88c5\uff1a\n\n```commandline\npip install animag\n```\n\n## \u4f7f\u7528\u793a\u4f8b\n\n```python\n# \u5bfc\u5165\u641c\u7d22\u5668\u7c7b\nfrom animag import Searcher\n\n# \u521b\u5efa\u641c\u7d22\u5668\u5b9e\u4f8b\nsearcher = Searcher(plugin_name='dmhy',\n no_search_errors=True)\n\n# \u641c\u7d22\u52a8\u753b(\u4ee3\u7406\u4ec5\u4f5c\u4e3a\u6f14\u793a)\nsearcher.search(\"\u846c\u9001\u7684\u8299\u8389\u83b2\",\n collected=True,\n proxies={'http': 'http://localhost:6666',\n 'https': 'http://localhost:6666'})\n\n# \u6253\u5370\u641c\u7d22\u7ed3\u679c\nprint(searcher.get_animes())\n\n\"\"\"\n\u793a\u4f8b\u8f93\u51fa(2024\u5e7412\u670822\u65e5\u7684\u7ed3\u679c)\uff1a\n\nSearch completed successfully: \u846c\u9001\u7684\u8299\u8389\u83b2\n[Anime(time='2024/10/20 12:23', title='[7\u00b3ACG\\u200b] \\u200b\u846c\u9001\u7684\u8299\u8389\u83b2/Sousou no Frieren S01 | 01-28 [\u7b80\u7e41\u5b57\u5e55] BDrip 1080p AV1 OPUS 2.0\\u200b\\u200b\\u200b', size='17.1GB', magnet='magnet:?xt=urn:btih:...\n\n\"\"\"\n\n# \u8f6c\u6362\u6240\u6709\u7ed3\u679c\u7684\u6587\u4ef6\u5927\u5c0f\u4e3aGB\nsearcher.size_format_all('MB')\n\n# \u4fdd\u5b58\u7ed3\u679c\u5230CSV\u6587\u4ef6\nsearcher.save_csv(\"search_results.csv\")\n```\n\n## \u652f\u6301\u7684\u63d2\u4ef6\n\n| \u7ad9\u70b9 | \u63d2\u4ef6\u53c2\u6570\u540d\u79f0 | \u901f\u5ea6 | \u5b63\u5ea6\u5168\u96c6\u641c\u7d22 | size | magnet | torrent | \u6ce8\u610f\u4e8b\u9879 |\n|:-------------------:|:--------------:|:--:|:------:|:----:|:------:|:-------:|:-------------------------------------------------------:|\n| dmhy.org | dmhy | \u9002\u4e2d | \u2705 | \u2705 | \u2705 | \u274e | \u65e0 |\n| dmhy.org | dmhy_rss | \u6781\u5feb | \u274e | \u274e | \u2705 | \u274e | \u65e0 |\n| nyaa.si | nyaa | \u6781\u5feb | \u274e | \u2705 | \u2705 | \u2705 | \u65e0 |\n| nyaa.si | nyaa_rss | \u6781\u5feb | \u274e | \u2705 | \u2705 | \u2705 | \u65e0 |\n| acg.rip | acgrip | \u9002\u4e2d | \u274e | \u2705 | \u274e | \u2705 | \u65e0 |\n| acg.rip | acgrip_rss | \u8f83\u6162 | \u274e | \u274e | \u274e | \u2705 | \u8bbe\u7f6e\u7684\u6700\u5927\u641c\u7d22\u9875\u6570\u662f5\u9875\uff0c\u56e0\u4e3a\u591a\u4e86\u4f1a\u88ab\u670d\u52a1\u5668\u963b\u65ad<br/>\u53ef\u4ee5\u81ea\u884c\u4fee\u6539\u6a21\u5757\u7684`MAX_PAGE`\uff0c\u4e0d\u5efa\u8bae\u8d85\u8fc79 |\n| www.tokyotosho.info | tokyotosho | \u9002\u4e2d | \u274e | \u2705 | \u2705 | \u2705 | \u9700\u8981\u82f1\u6587/\u65e5\u6587\u641c\u7d22 |\n| www.tokyotosho.info | tokyotosho_rss | \u8f83\u5feb | \u274e | \u2705 | \u2705 | \u2705 | \u9700\u8981\u82f1\u6587/\u65e5\u6587\u641c\u7d22 |\n| animetosho.org | animetosho | \u5feb | \u274e | \u2705 | \u2705 | \u2705 | \u9700\u8981\u82f1\u6587\u641c\u7d22 |\n| animetosho.org | animetosho_rss | \u5feb | \u274e | \u2705 | \u2705 | \u2705 | \u9700\u8981\u82f1\u6587\u641c\u7d22 |\n\n\u4ee5\u4e0a\u6240\u6709\u63d2\u4ef6\u90fd\u9700\u8981\u4ee3\u7406\u624d\u80fd\u6b63\u5e38\u5de5\u4f5c\uff0c\u786e\u4fdd\u6b63\u786e\u914d\u7f6e\u4ee3\u7406\u8bbe\u7f6e\n\n## \u914d\u7f6e\u9009\u9879\n\n### \u641c\u7d22\u5668\u521d\u59cb\u5316\u9009\u9879\n\n- `plugin_name`: \u63d2\u4ef6\u540d\u79f0\uff0c\u9ed8\u8ba4\uff1a'dmhy'\n- `parser`: \u89e3\u6790\u5668\u9009\u9879\uff0cRSS\u63d2\u4ef6\u65e0\u9700\u63d0\u4f9b\uff0c\u9ed8\u8ba4\uff1a'lxml'\n- `verify`: \u9a8c\u8bc1\u9009\u9879\uff0c\u662f\u5426\u9a8c\u8bc1SSL\u8bc1\u4e66\uff0c\u9ed8\u8ba4\uff1aTrue\n- `timefmt`: \u65f6\u95f4\u683c\u5f0f\uff0c\u9ed8\u8ba4\uff1a'%Y/%m/%d %H:%M'\n- `no_search_errors`: \u662f\u5426\u5ffd\u7565\u641c\u7d22\u9519\u8bef\uff0c\u9ed8\u8ba4\uff1aFalse\n\n### \u641c\u7d22\u9009\u9879\n\n- `keyword`: \u641c\u7d22\u5173\u952e\u8bcd\n- `collected`: \u662f\u5426\u6536\u96c6\u7ed3\u679c\n- `proxies`: \u4ee3\u7406\u8bbe\u7f6e\n- `system_proxy`: \u662f\u5426\u4f7f\u7528\u7cfb\u7edf\u4ee3\u7406\n- `**extra_options`: \u989d\u5916\u9009\u9879\uff0c\u4f1a\u5e76\u5165\u641c\u7d22\u65f6\u7684\u67e5\u8be2\u5b57\u7b26\u4e32\n\n## \u6838\u5fc3\u7ec4\u4ef6\n\n### Anime\u7c7b\n\n`Anime`\u7c7b\u7528\u4e8e\u8868\u793a\u5355\u4e2a\u52a8\u753b\u8d44\u6e90\u7684\u4fe1\u606f\n\n#### \u4e3b\u8981\u5c5e\u6027\n\n- `time`: \u53d1\u5e03\u65f6\u95f4\n- `title`: \u6807\u9898\n- `size`: \u6587\u4ef6\u5927\u5c0f\n- `magnet`: \u78c1\u529b\u94fe\u63a5\n- `torrent`: \u79cd\u5b50\u94fe\u63a5\n- `hash`: \u78c1\u529b\u94fe\u63a5\u7684\u54c8\u5e0c\u503c\uff0c\u5982\u679c\u4e0d\u5b58\u5728magnet\u5219\u5176\u4e0d\u5b58\u5728\n\n#### \u4e3b\u8981\u65b9\u6cd5\n\n- `size_format()`: \u8f6c\u6362\u6587\u4ef6\u5927\u5c0f\u5355\u4f4d\n- `set_timefmt()`: \u8f6c\u6362\u65f6\u95f4\u683c\u5f0f\n\n### Searcher\u7c7b\n\n`Searcher`\u7c7b\u662f\u641c\u7d22\u529f\u80fd\u7684\u6838\u5fc3\u5b9e\u73b0\n\n#### \u4e3b\u8981\u529f\u80fd\n\n- \u521d\u59cb\u5316\u641c\u7d22\u63d2\u4ef6\n- \u6267\u884c\u641c\u7d22\u64cd\u4f5c\n- \u5904\u7406\u641c\u7d22\u7ed3\u679c\n- \u5bfc\u51fa\u6570\u636e\n\n#### \u4e3b\u8981\u65b9\u6cd5\n\n- `search()`: \u641c\u7d22\u52a8\u753b\u8d44\u6e90\n- `get_anime()`: \u83b7\u53d6\u5355\u4e2a\u52a8\u753b\u8d44\u6e90\n- `get_animes()`: \u83b7\u53d6\u6240\u6709\u52a8\u753b\u8d44\u6e90\n- `size_format_all()`: \u6279\u91cf\u8f6c\u6362\u6587\u4ef6\u5927\u5c0f\u5355\u4f4d\n- `save_csv()`: \u5c06\u641c\u7d22\u7ed3\u679c\u4fdd\u5b58\u4e3aCSV\u6587\u4ef6\n- `set_timefmt()`: \u8bbe\u7f6e\u65f6\u95f4\u683c\u5f0f\n\n### \u9519\u8bef\u5904\u7406\n\n\u5e93\u5b9a\u4e49\u4e86\u591a\u79cd\u9519\u8bef\u7c7b\u578b\uff1a\n\n- `PluginImportError`: \u63d2\u4ef6\u5bfc\u5165\u9519\u8bef\n- `SearchRequestError`: \u641c\u7d22\u8bf7\u6c42\u9519\u8bef\n- `SearchParseError`: \u641c\u7d22\u7ed3\u679c\u89e3\u6790\u9519\u8bef\n- `SizeFormatError`: \u6587\u4ef6\u5927\u5c0f\u683c\u5f0f\u5316\u9519\u8bef\n- `TimeFormatError`: \u65f6\u95f4\u683c\u5f0f\u5316\u9519\u8bef\n- `HashExtractError`: \u78c1\u529b\u94fe\u63a5\u54c8\u5e0c\u63d0\u53d6\u9519\u8bef\n- `SaveCSVError`: CSV\u4fdd\u5b58\u9519\u8bef\n\n## \u81ea\u5b9a\u4e49\u63d2\u4ef6\n\nAnimag\u652f\u6301\u5b89\u88c5\u81ea\u5df1\u5b9e\u73b0\u7684\u641c\u7d22\u63d2\u4ef6\uff0c\u63d2\u4ef6\u7c7b\u5fc5\u987b\u7ee7\u627f`BasePlugin`\u7c7b\uff0c\u5e76\u5b9e\u73b0`search()`\u65b9\u6cd5\u3002\n\n### \u793a\u4f8b\u63d2\u4ef6\n\n```python\n# myplugin.py\n# \u6587\u4ef6\u540d\u5fc5\u987b\u662f\u5c0f\u5199\u7684\u63d2\u4ef6\u540d\u79f0\n\nfrom animag import BasePlugin, Anime\nfrom typing import List, Optional\n\n\nclass MyPlugin(BasePlugin):\n abstract = False # \u8fd9\u4e00\u884c\u5fc5\u987b\u8bbe\u7f6e\uff0c\u5426\u5219\u4e0d\u4f1a\u88ab\u8bc6\u522b\u4e3a\u63d2\u4ef6\n\n def __init__(self,\n parser: Optional[str] = None,\n verify: Optional[bool] = None,\n timefmt: Optional[str] = None):\n # \u63d2\u4ef6\u521d\u59cb\u5316\n pass\n\n def search(self, keyword: str,\n collected: Optional[bool] = None,\n proxies: Optional[dict] = None,\n system_proxy: Optional[bool] = None,\n **extra_options) -> List[Anime] | None:\n # \u5b9e\u73b0\u641c\u7d22\u903b\u8f91\n pass\n```\n\n### \u5b89\u88c5\u63d2\u4ef6\n\n\u5c06\u81ea\u5b9a\u4e49\u63d2\u4ef6\u5b89\u88c5\u5230animag/plugins\u76ee\u5f55\u540e\uff0c\u5728\u641c\u7d22\u5668\u521d\u59cb\u5316\u65f6\uff0c\u6307\u5b9a\u63d2\u4ef6\u540d\u79f0\u4e3a`myplugin`\u5373\u53ef\uff0c\u5982\u679c\u6ca1\u6709\u5b89\u88c5\u81f3\u6b64\u76ee\u5f55\uff0c\u4e5f\u53ef\u4ee5\u624b\u52a8\u5c06\u6a21\u5757\u5bfc\u5165\u81f3\u547d\u540d\u7a7a\u95f4\u3002\n\n```python\nfrom animag import Searcher\n\nsearcher = Searcher(plugin_name='myplugin')\n```\n\n\u6216\u8005\u662f\u76f4\u63a5\u5bfc\u5165\u63d2\u4ef6\u6a21\u5757\n\n```python\nimport myplugin\nfrom animag import Searcher\n\nsearcher = Searcher(plugin_name='myplugin')\n```\n\n## \u547d\u4ee4\u884c\u63a5\u53e3 (CLI)\n\n\u9879\u76ee\u9644\u8d60\u4e86\u4e00\u4e2aCLI\u5de5\u5177\uff0c\u4f7f\u7528 Rich \u5e93\u5b9e\u73b0\u7f8e\u89c2\u7684\u63a7\u5236\u53f0\u8f93\u51fa\uff0c\u652f\u6301\u4ea4\u4e92\u5f0f\u9009\u62e9\u3002\n\n### \u547d\u4ee4\u884c\u53c2\u6570\n\n```commandline\nanimag [-h] -s SEARCH [-p PLUGIN] [-c]\n```\n\n#### \u5fc5\u9009\u53c2\u6570\n\n-s, --search: \u641c\u7d22\u5173\u952e\u8bcd\n\n#### \u53ef\u9009\u53c2\u6570\n\n- `-h`, `--help`: \u663e\u793a\u5e2e\u52a9\u4fe1\u606f\n- `-p`, `--plugin`: \u6307\u5b9a\u641c\u7d22\u63d2\u4ef6\uff08\u9ed8\u8ba4\uff1a'dmhy'\uff09\n- `-c`, `--collected`: \u542f\u7528\u5b63\u5ea6\u5168\u96c6\u641c\u7d22\u6a21\u5f0f\n\n### \u4f7f\u7528\u793a\u4f8b\n\n```commandline\n# \u57fa\u672c\u641c\u7d22\nanimag -s \"\u846c\u9001\u7684\u8299\u8389\u83b2\"\n\n# \u4f7f\u7528\u7279\u5b9a\u63d2\u4ef6\u641c\u7d22\nanimag -s \"\u846c\u9001\u7684\u8299\u8389\u83b2\" -p nyaa\n\n# \u641c\u7d22\u5b63\u5ea6\u5168\u96c6\nanimag -s \"\u846c\u9001\u7684\u8299\u8389\u83b2\" -c\n```\n\n## \u6ce8\u610f\u4e8b\u9879\n\n1. \u76ee\u524d\u6240\u6709\u7684\u63d2\u4ef6\u90fd\u9700\u8981\u4ee3\u7406\u624d\u80fd\u5de5\u4f5c\uff0c\u786e\u4fdd\u6b63\u786e\u914d\u7f6e\u4ee3\u7406\u8bbe\u7f6e\n2. \u65f6\u95f4\u683c\u5f0f\u5fc5\u987b\u7b26\u5408Python\u7684\u65f6\u95f4\u683c\u5f0f\u5b57\u7b26\u4e32\u89c4\u8303\n",
"bugtrack_url": null,
"license": "AGPLv3",
"summary": "Anime magnet search library with strong scalability.",
"version": "2.1.1",
"project_urls": {
"Homepage": "https://github.com/adogecheems/animag"
},
"split_keywords": [
"plugin",
"rss",
"torrent",
"scraper",
"scalable",
"scalability",
"magnet-link",
"torrents",
"magnet",
"animes",
"nyaa-magnet-links",
"nyaa",
"anime-scraper",
"dmhy",
"nyaa-si",
"animetosho",
"tokyotoshokan",
"acgrip",
"dmhy-org",
"acg-rip"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3096296ef87209500ae2b83417df9fed5fd451e8e7e9fbe801ca1d75bafe5f56",
"md5": "1e8dbd06cfb88eb1581f91bc267f1aca",
"sha256": "8891850c7fac501a996c15edfe4dc17a7ac73f94711fc626727d4915203e4fe8"
},
"downloads": -1,
"filename": "animag-2.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1e8dbd06cfb88eb1581f91bc267f1aca",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 28337,
"upload_time": "2025-01-01T00:40:28",
"upload_time_iso_8601": "2025-01-01T00:40:28.744596Z",
"url": "https://files.pythonhosted.org/packages/30/96/296ef87209500ae2b83417df9fed5fd451e8e7e9fbe801ca1d75bafe5f56/animag-2.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a012667ec0b5332b1a9abd806fef4ad1baa90a3999b9d4a747d0116687560b7e",
"md5": "efad10010fe0d7fc5e66a1a5b9c0b30d",
"sha256": "d0808dcaabfcb8a7e3b9a14e15188a9c0ea2a5abef0e6c5c73d1bd30e38b7649"
},
"downloads": -1,
"filename": "animag-2.1.1.tar.gz",
"has_sig": false,
"md5_digest": "efad10010fe0d7fc5e66a1a5b9c0b30d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20524,
"upload_time": "2025-01-01T00:40:32",
"upload_time_iso_8601": "2025-01-01T00:40:32.385442Z",
"url": "https://files.pythonhosted.org/packages/a0/12/667ec0b5332b1a9abd806fef4ad1baa90a3999b9d4a747d0116687560b7e/animag-2.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-01 00:40:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "adogecheems",
"github_project": "animag",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "requests",
"specs": []
},
{
"name": "bs4",
"specs": []
},
{
"name": "lxml",
"specs": []
},
{
"name": "rich",
"specs": []
}
],
"lcname": "animag"
}