diff --git a/repo/wnacg.com.js b/repo/wnacg.com.js new file mode 100644 index 0000000..0b9bfb6 --- /dev/null +++ b/repo/wnacg.com.js @@ -0,0 +1,100 @@ +// ==MiruExtension== +// @name 紳士漫畫 +// @version v0.0.1 +// @author appdevelpo +// @lang zh-tw +// @license MIT +// @type manga +// @icon https://www.wnacg.com/favicon.ico +// @package wnacg.com +// @webSite https://www.wnacg.com +// @nsfw true +// ==/MiruExtension== + +export default class Mangafx extends Extension { + async latest(page) { + const res = await this.request(`/albums-index-page-${page}.html`); + const bsxList = res.match(/
  • (.+?)<\/h2>/; + const titleMatch = res.match(titleRegex); + const title = titleMatch ? titleMatch[1] : null; + const coverRegex = /.+src=([\s\S^]+?)<\/p>/; + const descriptionMatch = res.match(descriptionRegex); + const desc = descriptionMatch ? descriptionMatch[1] : null; + + const button_match = res.match(//g) + const id = button_match[0].match(/\d{6}/)[0]; + return { + title: title || "Unknown Title", + cover: cover || "", + desc: desc || "No description available.", + episodes: [ + { + title: "正常畫質", + urls: [{name:"1",url:`/photos-gallery-aid-${id}.html`}], + }, + { + title: "低畫質", + urls: [{name:"1",url:`/photos-webp-aid-${id}.html`}], + } + ], + }; + } + + async watch(url) { + const res = await this.request(url,{ + headers: {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/237.84.2.178 Safari/537.36", + referer: "https://www.wnacg.com"} + }); + const urls = [] + const url_list = res.match(/\/\/img4.qy0.ru\/data.+?.jpg/g) + url_list.forEach((element) => { + urls.push("https:"+element) + }) + return { + urls, + header: { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.142.86 Safari/537.36", + referer: "https://www.wnacg.com" + } + }; + } + } +