@@ -72,6 +72,59 @@ async def jm_getAlbum(album_id: str, AVS: str = Cookie(default=""), remember: st
72
72
return StandardResponse (status_code = res .status_code , error_msg = res .error_msg )
73
73
74
74
75
+ @router .get ("/chapters" , response_model = StandardResponse )
76
+ async def jm_getChapters (album_id : str , AVS : str = Cookie (default = "" ), remember : str = Cookie (default = "" ), api_mirror : str = Cookie (default = ApiList [0 ])):
77
+ # 章节信息
78
+ req = JMRequests (api_mirror , {
79
+ "AVS" : AVS ,
80
+ "remember" : remember
81
+ })
82
+
83
+ req_body = {
84
+ "key" : "0b931a6f4b5ccc3f8d870839d07ae7b2" ,
85
+ "view_mode_debug" : 1 ,
86
+ "view_mode" : "null" ,
87
+ "comicName" : "" ,
88
+ "skip" : "" ,
89
+ "id" : album_id
90
+ }
91
+
92
+ res = await req .get ("/chapter" , params = req_body )
93
+ await req .close ()
94
+
95
+ try :
96
+ assert res .data is not None
97
+ return StandardResponse (status_code = 200 , data = res .data )
98
+ except AssertionError :
99
+ return StandardResponse (status_code = res .status_code , error_msg = res .error_msg )
100
+
101
+
102
+ @router .get ("/img_list" , response_model = StandardResponse )
103
+ async def jm_getImagesList (chapter_id : str , AVS : str = Cookie (default = "" ), remember : str = Cookie (default = "" ), api_mirror : str = Cookie (default = ApiList [0 ])):
104
+ # 图片列表
105
+ req = JMRequests (api_mirror ,{
106
+ "AVS" : AVS ,
107
+ "remember" : remember
108
+ })
109
+
110
+ req_body = {
111
+ "id" :chapter_id ,
112
+ "mode" : "vertical" ,
113
+ "page" : 0 ,
114
+ "app_img_shunt" : "NaN"
115
+ }
116
+ # Alert! GetContent is desgined for the unencrypted data, but Chapter's data is encrypted, so you need to use Get instead.
117
+ res = await req .getContent ("/chapter_view_template" ,params = req_body )
118
+ await req .close ()
119
+
120
+ try :
121
+ assert res .data is not None
122
+ return StandardResponse (status_code = 200 , data = res .data )
123
+ except AssertionError :
124
+ return StandardResponse (status_code = res .status_code , error_msg = res .error_msg )
125
+
126
+
127
+
75
128
@router .get ("/logout" , response_model = StandardResponse )
76
129
async def jm_logout (response : Response ):
77
130
# 登出
@@ -139,4 +192,3 @@ async def jm_addFavor(album_id: str, AVS: str = Cookie(default=""), remember: st
139
192
await req .close ()
140
193
141
194
return res
142
-
0 commit comments