diff --git a/index.json b/index.json index b5dee4a..e46014e 100644 --- a/index.json +++ b/index.json @@ -79,5 +79,11 @@ "fileName": "comick.js", "key": "comick", "version": "1.1.0" + }, + { + "name": "优酷漫画", + "fileName": "ykmh.js", + "key": "ykmh", + "version": "1.0.0" } ] diff --git a/ykmh.js b/ykmh.js new file mode 100644 index 0000000..0e1faa3 --- /dev/null +++ b/ykmh.js @@ -0,0 +1,883 @@ +/** @type {import('./_venera_.js')} */ +class YKMHSource extends ComicSource { + name = "优酷漫画" + key = "ykmh" + version = "1.0.0" + minAppVersion = "1.4.0" + url = "https://cdn.jsdelivr.net/gh/venera-app/venera-configs@main/ykmh.js" + + get baseUrl() { + return "https://www.ykmh.net"; + } + + explore = [ + { + title: "优酷漫画", + type: "multiPartPage", + + load: async (page) => { + let res = await Network.get("https://www.ykmh.net") + + if (res.status !== 200) { + throw `Invalid status code: ${res.status}` + } + + function parseHotCarousel(html) { + let hotComics = [] + let carouselPattern = /
\s*[^<\/a>\s*