File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import { storage } from '@libs/storage';
1010class Novelight implements Plugin . PagePlugin {
1111 id = 'novelight' ;
1212 name = 'Novelight' ;
13- version = '1.1.2 ' ;
13+ version = '1.1.3 ' ;
1414 icon = 'src/en/novelight/icon.png' ;
1515 site = 'https://novelight.net/' ;
1616
@@ -187,7 +187,10 @@ class Novelight implements Plugin.PagePlugin {
187187 } catch ( error ) { }
188188
189189 const chapterName = isLocked ? '🔒 ' + title : title ;
190- const chapterUrl = ele . attribs . href ;
190+ let chapterUrl = ele . attribs . href ;
191+ if ( chapterUrl . charAt ( 0 ) == '/' ) {
192+ chapterUrl = chapterUrl . substring ( 1 ) ;
193+ }
191194 chapter . push ( {
192195 name : chapterName ,
193196 path : chapterUrl ,
@@ -201,6 +204,9 @@ class Novelight implements Plugin.PagePlugin {
201204 }
202205
203206 async parseChapter ( chapterPath : string ) : Promise < string > {
207+ if ( chapterPath . charAt ( 0 ) == '/' ) {
208+ chapterPath = chapterPath . substring ( 1 ) ;
209+ }
204210 const rawBody = await fetchApi ( this . site + chapterPath ) . then ( r => {
205211 const res = r . text ( ) ;
206212 return res ;
You can’t perform that action at this time.
0 commit comments