@@ -35,7 +35,7 @@ plugin.exports = class Plugin implements BookSource {
3535 * 静态属性 VERSION 必填
3636 * 插件版本 用于显示
3737 */
38- public static readonly VERSION : string = '1.0.0 ' ;
38+ public static readonly VERSION : string = '1.0.1 ' ;
3939 /**
4040 * 静态属性 VERSION_CODE 必填
4141 * 插件版本代码 用于比较本地插件与静态属性PLUGIN_FILE_URL所指插件的版本号
@@ -129,16 +129,11 @@ plugin.exports = class Plugin implements BookSource {
129129 const { body } = await this . request . get ( `${ Plugin . BASE_URL } /so/${ searchkey } ` ) ;
130130 const $ = this . cheerio ( body ) ;
131131 const dis = $ ( "main.flex > div" ) ;
132- console . log ( dis . length ) ;
132+ // console.log(dis.length);
133133 const results : SearchEntity [ ] = [ ] ;
134134 for ( const di of dis ) {
135135 const d = $ ( di ) . find ( "div:nth-child(1)" ) ;
136136 const c = $ ( di ) . find ( "div:nth-child(1) p" ) ;
137- // console.log(d.children("h3").text());
138- // console.log(d.children("span").text().substring(3));
139- // console.log(d.children("img").attr("src"));
140- // console.log(Plugin.BASE_URL + d.children("a").attr("href"));
141- // console.log(c.children("a").text().substring(5));
142137 results . push ( {
143138 bookname : d . children ( "h3" ) . text ( ) ,
144139 author : d . children ( "span" ) . text ( ) . substring ( 3 ) ,
@@ -154,11 +149,11 @@ plugin.exports = class Plugin implements BookSource {
154149 const { body } = await this . request . get ( detailPageUrl ) ;
155150 const $ = this . cheerio ( body ) ;
156151 const bookname = $ ( "h1" ) . text ( ) ;
157- const author = $ ( "span.text-sm.text-primarySix" ) . text ( ) . substring ( 3 ) ;
152+ const author = $ ( "span.text-sm.text-primarySix" ) . text ( ) . substring ( 4 ) ; //split(": ")[1]
158153 const latestChapterTitle = $ ( "p.mb-7 > a" ) . text ( ) ;
159- const coverImageUrl = $ ( "biv .book-cover img" ) . attr ( "src" ) ;
160- const intro = $ ( "p.mb-20" ) . text ( ) ;
161- // console.log(detailPageUrl );
154+ const coverImageUrl = $ ( "div .book-cover img" ) . attr ( "src" ) ;
155+ //console.log(coverImageUrl );
156+ const intro = $ ( "p.mb-20" ) . text ( ) . trim ( ) ;
162157 const items = $ ( "div.flex.flex-row.flex-wrap > a" ) ;
163158 const chapterList : Chapter [ ] = [ ] ;
164159 for ( const item of items ) {
0 commit comments