plugin.exports=class a{static ID="8s4K_SbZlemrK9LVddIHb";static TYPE=plugin.type.BOOK_SOURCE;static GROUP="👻MaxOS";static NAME="悠久小说";static VERSION="1.0.0";static VERSION_CODE=0;static PLUGIN_FILE_URL="https://raw.kkgithub.com/Maxthos/ReadCat-BookSource/main/Plugin/maxos-ujxsw.net.ts.js";static BASE_URL="http://www.ujxsw.net";static REQUIRE={};static SEARCH_FILTER=void 0;static DEPRECATED=void 0;request;store;cheerio;nanoid;uuid;constructor(t){var{request:t,store:e,cheerio:i,nanoid:a,uuid:s}=t;this.request=t,this.store=e,this.cheerio=i,this.nanoid=a,this.uuid=s}async search(t){console.log(t);var e,t=(await this.request.post(a.BASE_URL+"/searchbooks.php",{params:{searchkey:t}})).body,i=this.cheerio(t),s=[],t=i("div.shulist > ul");console.log(t.length);for(e of t){var r=i(e).find("li"),o=i(r.get(2)).find("a"),l=i(o.get(0)).attr("href").match(/\/book\/(\d+)/)[1],h=(console.log(l),l.slice(0,-3)||"0");console.log(h),s.push({bookname:i(o.get(0)).text(),author:i(r.get(3)).find("a").text(),coverImageUrl:a.BASE_URL+`/files/article/image/${h}/${l}/${l}s.jpg`,detailPageUrl:a.BASE_URL+i(o.get(0)).attr("href"),latestChapterTitle:i(o.get(1)).text()})}return s}async getDetail(t){t=(await this.request.get(t)).body;let e=this.cheerio(t);var t=e("#bookimg > a.img > img").attr("src"),i=e("div.d_title > h1 > em"),s=e("div.d_title > h1").text().replace(i.text().trim(),""),i=i.children("a").text(),r=e("#bookintro").text(),o=e("span.new_t > a").text(),l=a.BASE_URL+e("div.motion > a:nth-child(1)").attr("href"),l=(await this.request.get(l)).body,h=[],c=(e=this.cheerio(l))("#readerlist > ul > li");for(let t=0;t p").html().split("
").map(t=>(t=t.replaceAll(" ","").trim(),e.test(t)||i.test(t)?"":(t=i.test(t)?t.replace("/p",""):t).replace(e,"").trim())).filter(t=>""!==t)}};