1- #Python API For JMComic (禁漫天堂)
1+ <!-- 顶部标题 & 统计徽章-->
2+ <div align =" center " >
3+ <h1 style =" margin-top :0 " align =" center " >Python API for JMComic</h1 >
4+ <p align =" center " >
5+ <strong >提供 Python API 访问禁漫天堂(网页端 & 移动端),集成 GitHub Actions 下载器🚀</strong >
6+ </p >
27
3- 本项目封装了一套可用于爬取JM的Python API.
8+ [ ![ GitHub] ( https://img.shields.io/badge/-GitHub-181717?logo=github )] ( https://github.com/hect0x7 )
9+ [ ![ Stars] ( https://img.shields.io/github/stars/hect0x7/JMComic-Crawler-Python?color=orange&label=stars&style=flat )] ( https://github.com/hect0x7/JMComic-Crawler-Python/stargazers )
10+ [ ![ Forks] ( https://img.shields.io/github/forks/hect0x7/JMComic-Crawler-Python?color=green&label=forks&style=flat )] ( https://github.com/hect0x7/JMComic-Crawler-Python/forks )
11+ [ ![ GitHub latest releases] ( https://img.shields.io/github/v/release/hect0x7/JMComic-Crawler-Python?color=blue&label=version )] ( https://github.com/hect0x7/JMComic-Crawler-Python/releases/latest )
12+ [ ![ PyPI - Downloads] ( https://img.shields.io/pypi/dm/jmcomic?style=flat&color=hotpink )] ( https://pepy.tech/projects/jmcomic )
13+ [ ![ Licence] ( https://img.shields.io/github/license/hect0x7/JMComic-Crawler-Python?color=red )] ( https://github.com/hect0x7/JMComic-Crawler-Python )
414
5- 你可以通过简单的几行Python代码,实现下载JM上的本子到本地,并且是处理好的图片。
15+ </div >
16+
17+
18+
19+
20+ > 本项目封装了一套可用于爬取JM的Python API.
21+ >
22+ > 你可以通过简单的几行Python代码,实现下载JM上的本子到本地,并且是处理好的图片。
23+ >
24+ > ** 友情提示:珍爱JM,为了减轻JM的服务器压力,请不要一次性爬取太多本子,西门🙏🙏🙏** .
625
726[ 【指路】教程:使用GitHub Actions下载禁漫本子] ( ./assets/docs/sources/tutorial/1_github_actions.md )
827
928[ 【指路】教程:导出并下载你的禁漫收藏夹数据] ( ./assets/docs/sources/tutorial/10_export_favorites.md )
1029
11- ** 友情提示:珍爱JM,为了减轻JM的服务器压力,请不要一次性爬取太多本子,西门🙏🙏🙏** .
1230
1331##项目介绍
1432
4765
4866###1. 下载本子方法
4967
50- 只需要使用如下代码,就可以下载本子` JM422866 ` 的所有章节的图片:
68+ 只需要使用如下代码,就可以下载本子` JM123 ` 的所有章节的图片:
5169
5270``` python
5371import jmcomic# 导入此模块,需要先安装.
54- jmcomic.download_album(' 422866 ' )# 传入要下载的album的id,即可下载整个album到本地.
72+ jmcomic.download_album(' 123 ' )# 传入要下载的album的id,即可下载整个album到本地.
5573```
5674
5775上面的` download_album ` 方法还有一个参数` option ` ,可用于控制下载配置,配置包括禁漫域名、网络代理、图片格式转换、插件等等。
@@ -80,8 +98,8 @@ import jmcomic
8098# 创建配置对象
8199option = jmcomic.create_option_by_file('你的配置文件路径,例如 D:/option.yml')
82100# 使用option对象来下载本子
83- jmcomic.download_album(422866 , option)
84- # 等价写法: option.download_album(422866 )
101+ jmcomic.download_album(123 , option)
102+ # 等价写法: option.download_album(123 )
85103```
86104
87105###3. 使用命令行
@@ -91,10 +109,10 @@ jmcomic.download_album(422866, option)
91109
92110示例:
93111
94- 下载本子422866的命令
112+ 下载本子123的命令
95113
96114``` sh
97- jmcomic422866
115+ jmcomic123
98116```
99117同时下载本子123, 章节456的命令
100118``` sh