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