Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2eadad8

Browse files
committed
Add fallback if chapters are missing.
1 parenta964502 commit2eadad8

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

‎src/CatManga/CatManga.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const BASE = "https://catmanga.org"
1515

1616
exportconstCatMangaInfo:SourceInfo={
1717
icon:"icon.png",
18-
version:"1.0.1",
18+
version:"1.0.2",
1919
name:"CatManga",
2020
author:"PythonCoderAS",
2121
authorWebsite:"https://github.com/PythonCoderAS",

‎src/CatManga/CatMangaParser.ts‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,19 @@ export class CatMangaParser {
5555

5656
parsePages($:CheerioStatic):string[]{
5757
constjson=JSON.parse($("script#__NEXT_DATA__").html()||"{}");
58-
returnjson.props.pageProps.pages;
58+
if(json){
59+
constprops=json.props;
60+
if(props){
61+
constpageProps=props.pageProps;
62+
if(pageProps){
63+
constpages=pageProps.pages;
64+
if(pages){
65+
returnpages;
66+
}
67+
}
68+
}
69+
}
70+
return[];
5971
}
6072

6173
parseChapterList($:CheerioStatic,mangaId:string){

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp