File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,9 +8,10 @@ class WTRLAB implements Plugin.PluginBase {
88 id = 'WTRLAB' ;
99 name = 'WTR-LAB' ;
1010 site = 'https://wtr-lab.com/' ;
11- version = '1.1.2 ' ;
11+ version = '1.1.3 ' ;
1212 icon = 'src/en/wtrlab/icon.png' ;
1313 sourceLang = 'en/' ;
14+ baggage = '' ;
1415
1516 async popularNovels (
1617 page : number ,
@@ -137,6 +138,7 @@ class WTRLAB implements Plugin.PluginBase {
137138 const body = await fetchApi ( this . site + novelPath ) . then ( res => res . text ( ) ) ;
138139 const loadedCheerio = parseHTML ( body ) ;
139140
141+ this . baggage = loadedCheerio ( 'meta[name="baggage"]' ) . attr ( 'content' ) ! ;
140142 const nextDataElement = loadedCheerio ( '#__NEXT_DATA__' ) ;
141143 const nextDataText = nextDataElement . html ( ) ;
142144
@@ -591,8 +593,14 @@ class WTRLAB implements Plugin.PluginBase {
591593 const end = Math . min ( start + batchSize - 1 , totalChapters ) ;
592594
593595 try {
596+ const headers : Record < string , string > = { } ;
597+ if ( this . baggage ) {
598+ headers . baggage = this . baggage ;
599+ }
600+
594601 const response = await fetchApi (
595602 `${ this . site } api/chapters/${ rawId } ?start=${ start } &end=${ end } ` ,
603+ { headers } ,
596604 ) ;
597605
598606 const data = await response . json ( ) ;
You can’t perform that action at this time.
0 commit comments