File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11"use strict" ;
22
33parserFactory . register ( "wuxiaworld.eu" , ( ) => new WuxiaworldeuParser ( ) ) ;
4+ parserFactory . register ( "wuxia.click" , ( ) => new WuxiaworldeuParser ( ) ) ;
45
56class WuxiaworldeuParser extends Parser {
67 constructor ( ) {
78 super ( ) ;
89 }
910
1011 async getChapterUrls ( dom ) {
12+ let host = new URL ( dom . baseURI ) . host ;
1113 let tocUrl = dom . baseURI . replace ( "/novel/" , "/api/chapters/" ) + "/" ;
1214 let json = ( await HttpClient . fetchJson ( tocUrl ) ) . json ;
13- return json . map ( this . toChapter ) ;
15+ return json . map ( j => this . toChapter ( j , host ) ) ;
1416 }
1517
16- toChapter ( json ) {
18+ toChapter ( json , host ) {
1719 return ( {
18- sourceUrl : " https://www.wuxiaworld.eu /chapter/" + json . novSlugChapSlug ,
20+ sourceUrl : ` https://${ host } /chapter/${ json . novSlugChapSlug } ` ,
1921 title : json . title
2022 } ) ;
2123 }
You can’t perform that action at this time.
0 commit comments