From 1d7064506325ff15dd7809c86a248fd018894a39 Mon Sep 17 00:00:00 2001 From: appdevelpo <56633229+appdevelpo@users.noreply.github.com> Date: Wed, 11 Oct 2023 22:08:36 +0800 Subject: [PATCH 1/2] Create wnacg.com.js --- repo/wnacg.com.js | 100 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 repo/wnacg.com.js diff --git a/repo/wnacg.com.js b/repo/wnacg.com.js new file mode 100644 index 0000000..7e11735 --- /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 yes +// ==/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" + } + }; + } + } + From e29aeefb04f6e82da6d05a65d1a82e60b2aede13 Mon Sep 17 00:00:00 2001 From: appdevelpo <56633229+appdevelpo@users.noreply.github.com> Date: Wed, 11 Oct 2023 22:13:42 +0800 Subject: [PATCH 2/2] Update wnacg.com.js --- repo/wnacg.com.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repo/wnacg.com.js b/repo/wnacg.com.js index 7e11735..0b9bfb6 100644 --- a/repo/wnacg.com.js +++ b/repo/wnacg.com.js @@ -8,7 +8,7 @@ // @icon https://www.wnacg.com/favicon.ico // @package wnacg.com // @webSite https://www.wnacg.com -// @nsfw yes +// @nsfw true // ==/MiruExtension== export default class Mangafx extends Extension {