diff --git a/repo/flimypujab.com.js b/repo/flimypujab.com.js new file mode 100644 index 0000000..1e4939f --- /dev/null +++ b/repo/flimypujab.com.js @@ -0,0 +1,130 @@ +// ==MiruExtension== +// @name FlimyPujab +// @version v0.0.1 +// @author appdevelpo +// @lang hi +// @license MIT +// @icon https://111.90.151.26/wp-content/uploads/2020/06/cropped-Logo-2-60x60.png +// @package flimypujab.com +// @type bangumi +// @webSite https://111.90.151.26 +// @nsfw false +// ==/MiruExtension== + +export default class extends Extension { + async search(kw, page) { + const res = await this.request(`/page/${page}/?s=${kw}`,{ + headers: { + referer: `https://111.90.151.26`, + }, + }); + const bsxList = res.match(/)/g); + const bangumi = []; + bsxList.forEach((element) => { + const url = element.match(/href="https:\/\/111.90.151.26(\/.+?)"/)[1]; + const title = element.match(/title="Permalink to:(.+?)"/)[1]; + const cover = element.match(/src="(.+?)"/)[1]; + bangumi.push({ + title, + url:`${url};${cover}`, + cover, + }); + }); + return bangumi; + } + + async latest(page) { + const res = await this.request(`/page/${page}/`); + const bsxList = res.match(/)/g); + const bangumi = []; + bsxList.forEach((element) => { + const url = element.match(/href="https:\/\/111.90.151.26(\/.+?)"/)[1]; + const title = element.match(/title="Permalink to:(.+?)"/)[1]; + // console.log(title); + const cover = element.match(/src="(.+?)"/)[1]; + // console.log(cover); + bangumi.push({ + title, + url:`${url};${cover}`, + cover, + }); + }); + return bangumi; + } + + async detail(url) { + const url_split = url.split(';'); + const res = await this.request(url_split[0]); + const titleRegex = /

(.+?)<\/h2>/; + const titleMatch = res.match(titleRegex); + const title = titleMatch ? titleMatch[1] : null; + const cover = url_split[1]; + const descriptionRegex = /
[\s]+

(.+?)<\/p>/; + const descriptionMatch = res.match(descriptionRegex); + const desc = descriptionMatch ? descriptionMatch[1] : null; + + const ep_button = res.match(/