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

Commitb567eec

Browse files
committed
Decode entities
1 parent3b48a43 commitb567eec

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

‎src/RainOfSnow/RainOfSnow.ts‎

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

1616
exportconstRainOfSnowInfo:SourceInfo={
1717
icon:"icon.png",
18-
version:"1.3.1",
18+
version:"1.3.2",
1919
name:"RainOfSnow",
2020
author:"PythonCoderAS",
2121
authorWebsite:"https://github.com/PythonCoderAS",

‎src/RainOfSnow/RainOfSnowParser.ts‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ import {Chapter, LanguageCode, Manga, MangaStatus, MangaTile, Tag} from "paperba
22

33
exportclassRainOfSnowParser{
44

5+
decodeHTMLEntity(str:string):string{
6+
returnstr.replace(/&#(\d+);/g,function(match,dec){
7+
returnString.fromCharCode(dec);
8+
})
9+
}
10+
511
parseMangaList($:CheerioStatic,base:string,filterElement:Cheerio|null=null){
612
if(filterElement===null){
713
filterElement=$.root()
@@ -73,13 +79,13 @@ export class RainOfSnowParser {
7379
}))
7480
constchapterList=this.parseChapterList($,mangaId,base)
7581
constmangaObj:Manga={
76-
author:$("small",$("ul.vbtcolor1 li").first()).text().trim(),
82+
author:this.decodeHTMLEntity($("small",$("ul.vbtcolor1 li").first()).text().trim()),
7783
desc:summary,
7884
id:mangaId,
7985
image:$("img",$("div.container div.row").first()).first().attr("src")||"",
8086
rating:0,
8187
status:MangaStatus.ONGOING,
82-
titles:[$("div.text h2").first().text()],
88+
titles:[this.decodeHTMLEntity($("div.text h2").first().text())],
8389
tags:[createTagSection({
8490
id:"1",
8591
label:"1",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp