plugin.exports=class a{static ID="-auN2PYpFV8DcE4mZgVD5";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-biqugewx.info.ts.js";static BASE_URL="http://www.biqugewx.info";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:r}=t;this.request=t,this.store=e,this.cheerio=i,this.nanoid=a,this.uuid=r}async search(t){t=(await this.request.get(a.BASE_URL+"/modules/article/search.php?searchkey="+t)).body;let s=this.cheerio(t);t=s("table.grid > tr:gt(0)");console.log(t.length);let h=[];return s("table.grid tr:gt(0)").each((t,e)=>{s(e).find("div:nth-child(1)"),s(e).find("div:nth-child(1) p");var i=s(e).find("td:nth-child(1) > a").attr("href").match(/\/biquge\/(\d+)/)[1],r=(console.log(i),i.slice(0,-3)||"0");h.push({bookname:s(e).find("td:nth-child(1) > a").text(),author:s(e).find("td:nth-child(3)").text(),coverImageUrl:a.BASE_URL+`/files/article/image/${r}/${i}/${i}s.jpg`,detailPageUrl:s(e).find("td:nth-child(1) > a").attr("href"),latestChapterTitle:s(e).find("td:nth-child(2) > a").text().trim()})}),h}async getDetail(t){t=(await this.request.get(t)).body;let i=this.cheerio(t);var t=i("#info > h1").text(),e=i("#info > p:nth-child(3)").text().substring(7),a=i("#info > p:nth-child(7) > a").text(),r=i("#fmimg > img").attr("src"),s=i("div.box_con:nth-child(7) > #list > p").text().trim();let h=[];return i("div#list dl dd a").each((t,e)=>{h.push({title:i(e).text(),url:i(e).attr("href")})}),{bookname:t,author:e,latestChapterTitle:a,coverImageUrl:r,intro:s,chapterList:h}}async getTextContent(t){t=(await this.request.get(t.url)).body,t=this.cheerio(t);return t("#booktext center").remove(),t("#booktext").html().split("
").filter(t=>t.trim())}};