This commit is contained in:
Ftbom
2024-05-04 14:11:32 +00:00
parent fade24ed1a
commit 9504fead9c
4 changed files with 1465 additions and 1453 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

View File

@@ -1,258 +1,259 @@
const mangayomiSources = [{ const mangayomiSources = [{
"name": "新新漫画", "name": "新新漫画",
"lang": "zh", "lang": "zh",
"baseUrl": "https://www.77mh.nl", "baseUrl": "https://www.77mh.nl",
"apiUrl": "", "apiUrl": "",
"iconUrl": "https://www.77mh.nl/favicon.ico", "iconUrl": "https://www.77mh.nl/favicon.ico",
"typeSource": "single", "typeSource": "single",
"isManga": true, "isManga": true,
"isNsfw": false, "isNsfw": false,
"version": "0.0.1", "version": "0.0.1",
"apiUrl": "", "apiUrl": "",
"dateFormat": "", "dateFormat": "",
"dateFormatLocale": "", "dateFormatLocale": "",
"pkgName": "manga/src/zh/77mh.js" "pkgName": "manga/src/zh/77mh.js"
}]; }];
class DefaultExtension extends MProvider { class DefaultExtension extends MProvider {
StringResolve1(p, a, c, k, e, d) { StringResolve1(p, a, c, k, e, d) {
e = function(c) { e = function(c) {
return c.toString(36) return c.toString(36)
}; };
if (!''.replace(/^/, String)) { if (!''.replace(/^/, String)) {
while (c--) {
d[c.toString(a)] = k[c] || c.toString(a)
}
k = [function(e) {
return d[e]
}];
e = function() {
return '\\w+'
};
c = 1
};
while (c--) { while (c--) {
if (k[c]) { d[c.toString(a)] = k[c] || c.toString(a)
p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]) }
} k = [function(e) {
return d[e]
}];
e = function() {
return '\\w+'
};
c = 1
};
while (c--) {
if (k[c]) {
p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c])
} }
return p
} }
return p
StringResolve2(p, a, c, k, e, d) { }
e = function(c) {
return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) StringResolve2(p, a, c, k, e, d) {
}; e = function(c) {
if (!''.replace(/^/, String)) { return (c < a ? '' : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36))
while (c--) { };
d[e(c)] = k[c] || e(c) if (!''.replace(/^/, String)) {
}
k = [function(e) {
return d[e]
}];
e = function() {
return '\\w+'
};
c = 1
};
while (c--) { while (c--) {
if (k[c]) { d[e(c)] = k[c] || e(c)
p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c])
}
} }
return p k = [function(e) {
} return d[e]
}];
async getIndex1(url) { e = function() {
const res = await new Client().get(url); return '\\w+'
const doc = new Document(res.body);
const elements = doc.select("div.ar_list_co li");
const mangas = [];
for (const element of elements) {
const title = element.selectFirst("span a").text;
const url = element.selectFirst("span a").attr("href");
const cover = element.selectFirst("img").attr("src");
mangas.push({
name: title,
link: url,
imageUrl: cover
});
}
return {
list: mangas,
hasNextPage: true
}; };
c = 1
} };
while (c--) {
async getIndex2(url) { if (k[c]) {
const res = await new Client().get(url); p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c])
const doc = new Document(res.body);
const elements = doc.select("div.ar_list_co dl");
const mangas = [];
for (const element of elements) {
const title = element.selectFirst("h1 a").text.replace("<em>", "").replace("</em>", "");
const url = element.selectFirst("h1 a").attr("href");
const cover = element.selectFirst("img").attr("src");
mangas.push({
name: title,
link: url,
imageUrl: cover
});
} }
return {
list: mangas,
hasNextPage: true
};
} }
return p
async getPopular(page) { }
return await this.getIndex1(this.source.baseUrl + "/new_coc.html");
} async getIndex1(url) {
const res = await new Client().get(url);
async getLatestUpdates(page) { const doc = new Document(res.body);
return await this.getIndex1(`${this.source.baseUrl}/lianzai/index_${page - 1}.html`); const elements = doc.select("div.ar_list_co li");
} const mangas = [];
for (const element of elements) {
async search(query, page, filters) { const title = element.selectFirst("span a").text;
var url; const url = element.selectFirst("span a").attr("href");
if (query == "") { const cover = element.selectFirst("img").attr("src");
url = `${this.source.baseUrl}${filters[0]["values"][filters[0]["state"]]["value"]}/index_${page-1}.html` mangas.push({
} else {
url = `${this.source.baseUrl.replace("www","so")}/k.php?k=${query}&p=${page}`;
}
return await this.getIndex2(url);
}
async getDetail(url) {
const res = await new Client().get(this.source.baseUrl + url);
const doc = new Document(res.body);
const info = doc.selectFirst("div.ar_list_coc");
const cover = info.selectFirst("img").attr("src");
const title = info.selectFirst("h1").text;
const info_other = info.selectFirst("ul.ar_list_coc");
const author = info_other.selectFirst("a").text;
const status_str = info_other.select("a")[1].text;
var status;
if (status_str == "已完结") {
status = 1;
} else {
status = 0;
}
const desc = info.selectFirst("i#det").text;
const elements = doc.select("ul.ar_rlos_bor li a");
const chapters = [];
for (const element of elements) {
chapters.push({
name: element.text,
url: element.attr("href")
});
}
return {
name: title, name: title,
imageUrl: cover, link: url,
description: desc, imageUrl: cover
author: author, });
status: status,
episodes: chapters
};
} }
return {
list: mangas,
hasNextPage: true
};
}
async getIndex2(url) {
const res = await new Client().get(url);
const doc = new Document(res.body);
const elements = doc.select("div.ar_list_co dl");
const mangas = [];
for (const element of elements) {
const title = element.selectFirst("h1 a").text.replace("<em>", "").replace("</em>", "");
const url = element.selectFirst("h1 a").attr("href");
const cover = element.selectFirst("img").attr("src");
mangas.push({
name: title,
link: url,
imageUrl: cover
});
}
return {
list: mangas,
hasNextPage: true
};
}
async getPageList(url) { async getPopular(page) {
const preference = new SharedPreferences(); return await this.getIndex1(this.source.baseUrl + "/new_coc.html");
const image_host = preference.get("imghost"); }
const res = await new Client().get(this.source.baseUrl + url);
const strs = res.body.match(/return p}\('(.*?)'.split\('/)[1].split(','); async getLatestUpdates(page) {
var result; return await this.getIndex1(`${this.source.baseUrl}/lianzai/index_${page - 1}.html`);
try { }
result = this.StringResolve1(strs[0], strs[1], strs[2], strs[3].split('|'), 0, {}).replaceAll("'", "");
} catch { async search(query, page, filters) {
result = this.StringResolve2(strs[0], strs[1], strs[2], strs[3].split('|'), 0, {}).replaceAll("'", ""); var url;
} if (query == "") {
const url_part = result.match(/var img_s=(.*?);var preLink_b/)[1]; url = `${this.source.baseUrl}${filters[0]["values"][filters[0]["state"]]["value"]}/index_${page-1}.html`
const urls = result.match(/var msg=(.*?);var maxPage/)[1].replaceAll("\\", "").split('|'); } else {
const pages = []; url = `${this.source.baseUrl.replace("www","so")}/k.php?k=${query}&p=${page}`;
for (const url of urls) {
pages.push(image_host + `/h${url_part}/` + url);
}
return pages;
} }
return await this.getIndex2(url);
getFilterList() { }
return [{
type: "category", async getDetail(url) {
name: "分类", const res = await new Client().get(this.source.baseUrl + url);
type_name: "SelectFilter", const doc = new Document(res.body);
values: [{ const info = doc.selectFirst("div.ar_list_coc");
value: "/rexue", const cover = info.selectFirst("img").attr("src");
name: "热血机战", const title = info.selectFirst("h1").text;
type_name: "SelectOption" const info_other = info.selectFirst("ul.ar_list_coc");
}, const author = info_other.selectFirst("a").text;
{ const status_str = info_other.select("a")[1].text;
value: "/kehuan", var status;
name: "科幻未来", if (status_str == "已完结") {
type_name: "SelectOption" status = 1;
}, } else {
{ status = 0;
value: "/kongbu",
name: "恐怖惊悚",
type_name: "SelectOption"
},
{
value: "/xuanyi",
name: "推理悬疑",
type_name: "SelectOption"
},
{
value: "/gaoxiao",
name: "滑稽搞笑",
type_name: "SelectOption"
},
{
value: "/love",
name: "恋爱生活",
type_name: "SelectOption"
},
{
value: "/danmei",
name: "耽美人生",
type_name: "SelectOption"
},
{
value: "/tiyu",
name: "体育竞技",
type_name: "SelectOption"
},
{
value: "/chunqing",
name: "纯情少女",
type_name: "SelectOption"
},
{
value: "/qihuan",
name: "魔法奇幻",
type_name: "SelectOption"
},
{
value: "/wuxia",
name: "武侠经典",
type_name: "SelectOption"
}
]
}];
} }
const desc = info.selectFirst("i#det").text;
const elements = doc.select("ul.ar_rlos_bor li a");
const chapters = [];
for (const element of elements) {
chapters.push({
name: element.text,
url: element.attr("href")
});
}
chapters.reverse();
return {
name: title,
imageUrl: cover,
description: desc,
author: author,
status: status,
episodes: chapters
};
}
async getPageList(url) {
const preference = new SharedPreferences();
const image_host = preference.get("imghost");
const res = await new Client().get(this.source.baseUrl + url);
const strs = res.body.match(/return p}\('(.*?)'.split\('/)[1].split(',');
var result;
try {
result = this.StringResolve1(strs[0], strs[1], strs[2], strs[3].split('|'), 0, {}).replaceAll("'", "");
} catch {
result = this.StringResolve2(strs[0], strs[1], strs[2], strs[3].split('|'), 0, {}).replaceAll("'", "");
}
const url_part = result.match(/var img_s=(.*?);var preLink_b/)[1];
const urls = result.match(/var msg=(.*?);var maxPage/)[1].replaceAll("\\", "").split('|');
const pages = [];
for (const url of urls) {
pages.push(image_host + `/h${url_part}/` + url);
}
return pages;
}
getSourcePreferences() { getFilterList() {
return [{ return [{
"key": "imghost", type: "category",
"listPreference": { name: "分类",
"title": "图片服务器", type_name: "SelectFilter",
"summary": "", values: [{
"valueIndex": 0, value: "/rexue",
"entries": ["服务器1", "服务器2"], name: "热血机战",
"entryValues": ["https://picsh.77dm.top", "https://imgsh.dm365.top"], type_name: "SelectOption"
},
{
value: "/kehuan",
name: "科幻未来",
type_name: "SelectOption"
},
{
value: "/kongbu",
name: "恐怖惊悚",
type_name: "SelectOption"
},
{
value: "/xuanyi",
name: "推理悬疑",
type_name: "SelectOption"
},
{
value: "/gaoxiao",
name: "滑稽搞笑",
type_name: "SelectOption"
},
{
value: "/love",
name: "恋爱生活",
type_name: "SelectOption"
},
{
value: "/danmei",
name: "耽美人生",
type_name: "SelectOption"
},
{
value: "/tiyu",
name: "体育竞技",
type_name: "SelectOption"
},
{
value: "/chunqing",
name: "纯情少女",
type_name: "SelectOption"
},
{
value: "/qihuan",
name: "魔法奇幻",
type_name: "SelectOption"
},
{
value: "/wuxia",
name: "武侠经典",
type_name: "SelectOption"
} }
}]; ]
} }];
}
getSourcePreferences() {
return [{
"key": "imghost",
"listPreference": {
"title": "图片服务器",
"summary": "",
"valueIndex": 0,
"entries": ["服务器1", "服务器2"],
"entryValues": ["https://picsh.77dm.top", "https://imgsh.dm365.top"],
}
}];
}
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff