update mangas
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
async function searchContent(keyword, page=0) {
|
async function searchResults(keyword, page=0) {
|
||||||
const results = [];
|
const results = [];
|
||||||
try {
|
try {
|
||||||
const response = await fetch("https://mangabuddy.com/api/manga/search?q=" + encodeURIComponent(keyword));
|
const response = await fetch("https://mangabuddy.com/api/manga/search?q=" + encodeURIComponent(keyword));
|
||||||
@@ -21,7 +21,7 @@ async function searchContent(keyword, page=0) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getContentData(url) {
|
async function extractDetails(url) {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
const html = await response.text();
|
const html = await response.text();
|
||||||
@@ -41,7 +41,7 @@ async function getContentData(url) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChapters(url) {
|
async function extractChapters(url) {
|
||||||
const results = [];
|
const results = [];
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
@@ -80,7 +80,7 @@ async function getChapters(url) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChapterImages(url) {
|
async function extractImages(url) {
|
||||||
const results = [];
|
const results = [];
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
async function searchContent(keyword,page=0){
|
async function searchResults(keyword,page=0){
|
||||||
const results = [];
|
const results = [];
|
||||||
try {
|
try {
|
||||||
const headers = {
|
const headers = {
|
||||||
@@ -31,7 +31,7 @@ async function searchContent(keyword,page=0){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getContentData(ID) {
|
async function extractDetails(ID) {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`https://api.mangacloud.org/comic/${ID}`);
|
const response = await fetch(`https://api.mangacloud.org/comic/${ID}`);
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
@@ -48,7 +48,7 @@ async function getContentData(ID) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChapters(ID) {
|
async function extractChapters(ID) {
|
||||||
const results = [];
|
const results = [];
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`https://api.mangacloud.org/comic/${ID}`);
|
const response = await fetch(`https://api.mangacloud.org/comic/${ID}`);
|
||||||
@@ -73,7 +73,7 @@ async function getChapters(ID) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChapterImages(url) {
|
async function extractImages(url) {
|
||||||
const chapterID = url.split("/").pop();
|
const chapterID = url.split("/").pop();
|
||||||
const ID = url.split("/").slice(-2, -1)[0];
|
const ID = url.split("/").slice(-2, -1)[0];
|
||||||
const results = [];
|
const results = [];
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
async function searchContent(keyword, page=0) {
|
async function searchResults(keyword, page=0) {
|
||||||
const results = [];
|
const results = [];
|
||||||
try {
|
try {
|
||||||
const offset = page * 100;
|
const offset = page * 100;
|
||||||
@@ -46,7 +46,7 @@ async function searchContent(keyword, page=0) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getContentData(ID) {
|
async function extractDetails(ID) {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`https://api.mangadex.org/manga/${ID}?includes[]=artist&includes[]=author&includes[]=cover_art`);
|
const response = await fetch(`https://api.mangadex.org/manga/${ID}?includes[]=artist&includes[]=author&includes[]=cover_art`);
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
@@ -77,7 +77,7 @@ async function getContentData(ID) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChapters(url) {
|
async function extractChapters(url) {
|
||||||
const results = [];
|
const results = [];
|
||||||
try {
|
try {
|
||||||
const limit = 100;
|
const limit = 100;
|
||||||
@@ -147,7 +147,7 @@ async function getChapters(url) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChapterImages(chapterId) {
|
async function extractImages(chapterId) {
|
||||||
try {
|
try {
|
||||||
const apiEndpoint = `https://api.mangadex.org/at-home/server/${chapterId}`;
|
const apiEndpoint = `https://api.mangadex.org/at-home/server/${chapterId}`;
|
||||||
const apiResponse = await fetch(apiEndpoint);
|
const apiResponse = await fetch(apiEndpoint);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
async function searchContent(input,page=0){
|
async function searchResults(input,page=0){
|
||||||
function parseSearchResults(html) {
|
function parseSearchResults(html) {
|
||||||
const results = [];
|
const results = [];
|
||||||
const regex = /<div class="unit item-\d+">[\s\S]*?<a href="\/manga\/([\w\-\.]+)"[^>]*class="poster"[\s\S]*?<img src="([^"]*)"[^>]*alt="([^"]*)"/g;
|
const regex = /<div class="unit item-\d+">[\s\S]*?<a href="\/manga\/([\w\-\.]+)"[^>]*class="poster"[\s\S]*?<img src="([^"]*)"[^>]*alt="([^"]*)"/g;
|
||||||
@@ -20,7 +20,7 @@ async function searchContent(input,page=0){
|
|||||||
return parseSearchResults(data);
|
return parseSearchResults(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getContentData(url) {
|
async function extractDetails(url) {
|
||||||
function parseHtmlData(htmlContent) {
|
function parseHtmlData(htmlContent) {
|
||||||
const genreRegex = /<a href="\/genre\/[^"]*">([^<]+)<\/a>/g;
|
const genreRegex = /<a href="\/genre\/[^"]*">([^<]+)<\/a>/g;
|
||||||
const tags = [];
|
const tags = [];
|
||||||
@@ -69,7 +69,7 @@ async function getContentData(url) {
|
|||||||
return parseHtmlData(data);
|
return parseHtmlData(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChapters(url) {
|
async function extractChapters(url) {
|
||||||
const mangaIdMatch = url.match(/\.([a-z0-9]+)$/);
|
const mangaIdMatch = url.match(/\.([a-z0-9]+)$/);
|
||||||
const mangaId = mangaIdMatch ? mangaIdMatch[1] : null;
|
const mangaId = mangaIdMatch ? mangaIdMatch[1] : null;
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@ async function getChapters(url) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChapterImages(ID) {
|
async function extractImages(ID) {
|
||||||
vrf = generate_vrf(`chapter@${ID}`);
|
vrf = generate_vrf(`chapter@${ID}`);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
async function searchContent(keyword, page=0) {
|
async function searchResults(keyword, page=0) {
|
||||||
const results = [];
|
const results = [];
|
||||||
try {
|
try {
|
||||||
const response = await fetch("https://ww2.mangafreak.me/Find/" + encodeURIComponent(keyword));
|
const response = await fetch("https://ww2.mangafreak.me/Find/" + encodeURIComponent(keyword));
|
||||||
@@ -20,7 +20,7 @@ async function searchContent(keyword, page=0) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getContentData(url) {
|
async function extractDetails(url) {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
const html = await response.text();
|
const html = await response.text();
|
||||||
@@ -40,7 +40,7 @@ async function getContentData(url) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChapters(url) {
|
async function extractChapters(url) {
|
||||||
const results = [];
|
const results = [];
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
@@ -67,7 +67,7 @@ async function getChapters(url) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChapterImages(url) {
|
async function extractImages(url) {
|
||||||
const results = [];
|
const results = [];
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
async function searchContent(keyword, page = 0) {
|
async function searchResults(keyword, page = 0) {
|
||||||
let results = [];
|
let results = [];
|
||||||
try {
|
try {
|
||||||
const headers = {
|
const headers = {
|
||||||
@@ -34,7 +34,7 @@ async function searchContent(keyword, page = 0) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getContentData(url) {
|
async function extractDetails(url) {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
const html = await response.text();
|
const html = await response.text();
|
||||||
@@ -74,7 +74,7 @@ async function getContentData(url) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChapters(url) {
|
async function extractChapters(url) {
|
||||||
const results = [];
|
const results = [];
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
@@ -110,7 +110,7 @@ async function getChapters(url) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChapterImages(url) {
|
async function extractImages(url) {
|
||||||
const results = [];
|
const results = [];
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ function decodeHtmlEntities(text) {
|
|||||||
return text.replace(/&#?\w+;/g, (entity) => map[entity] || entity);
|
return text.replace(/&#?\w+;/g, (entity) => map[entity] || entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function searchContent(keyword) {
|
async function searchResults(keyword) {
|
||||||
const results = [];
|
const results = [];
|
||||||
|
|
||||||
const pages = [0, 2, 3, 4, 5];
|
const pages = [0, 2, 3, 4, 5];
|
||||||
@@ -53,7 +53,7 @@ async function searchContent(keyword) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getContentData(url) {
|
async function extractDetails(url) {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
const html = await response.text();
|
const html = await response.text();
|
||||||
@@ -82,7 +82,7 @@ async function getContentData(url) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChapters(url) {
|
async function extractChapters(url) {
|
||||||
const results = [];
|
const results = [];
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
@@ -129,7 +129,7 @@ async function getChapters(url) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChapterImages(url) {
|
async function extractImages(url) {
|
||||||
const results = [];
|
const results = [];
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
async function searchContent(keyword, page=0) {
|
async function searchResults(keyword, page=0) {
|
||||||
const results = [];
|
const results = [];
|
||||||
try {
|
try {
|
||||||
const response = await fetch("https://mangapub.com/api/book/search?q=" + encodeURIComponent(keyword));
|
const response = await fetch("https://mangapub.com/api/book/search?q=" + encodeURIComponent(keyword));
|
||||||
@@ -21,7 +21,7 @@ async function searchContent(keyword, page=0) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getContentData(url) {
|
async function extractDetails(url) {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
const html = await response.text();
|
const html = await response.text();
|
||||||
@@ -41,7 +41,7 @@ async function getContentData(url) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChapters(url) {
|
async function extractChapters(url) {
|
||||||
const results = [];
|
const results = [];
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
@@ -80,7 +80,7 @@ async function getChapters(url) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChapterImages(url) {
|
async function extractImages(url) {
|
||||||
const results = [];
|
const results = [];
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
async function searchContent(keyword, page = 0) {
|
async function searchResults(keyword, page = 0) {
|
||||||
let results = [];
|
let results = [];
|
||||||
try {
|
try {
|
||||||
const headers = {
|
const headers = {
|
||||||
@@ -28,7 +28,7 @@ async function searchContent(keyword, page = 0) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getContentData(urlID) {
|
async function extractDetails(urlID) {
|
||||||
try {
|
try {
|
||||||
const url = urlID.split(".").slice(0, -1).join(".");
|
const url = urlID.split(".").slice(0, -1).join(".");
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
@@ -49,7 +49,7 @@ async function getContentData(urlID) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChapters(urlID) {
|
async function extractChapters(urlID) {
|
||||||
const results = [];
|
const results = [];
|
||||||
try {
|
try {
|
||||||
function md5(string) {
|
function md5(string) {
|
||||||
@@ -272,7 +272,7 @@ async function getChapters(urlID) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChapterImages(url) {
|
async function extractImages(url) {
|
||||||
const results = [];
|
const results = [];
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
async function searchContent(keyword,page=0){
|
async function searchResults(keyword,page=0){
|
||||||
const headers = {
|
const headers = {
|
||||||
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
|
||||||
"X-Requested-With": "XMLHttpRequest",
|
"X-Requested-With": "XMLHttpRequest",
|
||||||
@@ -25,7 +25,7 @@ async function searchContent(keyword,page=0){
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getContentData(url) {
|
async function extractDetails(url) {
|
||||||
function parseHtmlData(htmlContent) {
|
function parseHtmlData(htmlContent) {
|
||||||
const tagsRegex = /<span>标\s+签:\s*<\/span>\s*([\s\S]*?)<span>状/;
|
const tagsRegex = /<span>标\s+签:\s*<\/span>\s*([\s\S]*?)<span>状/;
|
||||||
const descRegex = /<p class="content">([\s\S]+?)<\/p>/;
|
const descRegex = /<p class="content">([\s\S]+?)<\/p>/;
|
||||||
@@ -53,7 +53,7 @@ async function getContentData(url) {
|
|||||||
return parseHtmlData(data);
|
return parseHtmlData(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChapters(url) {
|
async function extractChapters(url) {
|
||||||
function parseHtmlData(htmlContent) {
|
function parseHtmlData(htmlContent) {
|
||||||
const chapterRegex = /<a href="([^"]+)"><li>([^<]+)<\/li><\/a>/g;
|
const chapterRegex = /<a href="([^"]+)"><li>([^<]+)<\/li><\/a>/g;
|
||||||
const chapters = [];
|
const chapters = [];
|
||||||
@@ -86,7 +86,7 @@ async function getChapters(url) {
|
|||||||
return parseHtmlData(data);
|
return parseHtmlData(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChapterImages(url) {
|
async function extractImages(url) {
|
||||||
function parseHtmlData(htmlContent) {
|
function parseHtmlData(htmlContent) {
|
||||||
const scriptRegex = /<script[^>]*type=['"]text\/javascript['"][^>]*>([\s\S]*?)<\/script>/g;
|
const scriptRegex = /<script[^>]*type=['"]text\/javascript['"][^>]*>([\s\S]*?)<\/script>/g;
|
||||||
let obfuscatedScript = null;
|
let obfuscatedScript = null;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
async function searchContent(keyword, page=0) {
|
async function searchResults(keyword, page=0) {
|
||||||
const results = [];
|
const results = [];
|
||||||
try {
|
try {
|
||||||
const headers = {
|
const headers = {
|
||||||
@@ -30,7 +30,7 @@ async function searchContent(keyword, page=0) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getContentData(url) {
|
async function extractDetails(url) {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
const html = await response.text();
|
const html = await response.text();
|
||||||
@@ -61,7 +61,7 @@ async function getContentData(url) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChapters(url) {
|
async function extractChapters(url) {
|
||||||
const results = [];
|
const results = [];
|
||||||
try {
|
try {
|
||||||
const fullUrl = url.replace(/\/[^/]+$/, "/full-chapter-list");
|
const fullUrl = url.replace(/\/[^/]+$/, "/full-chapter-list");
|
||||||
@@ -93,7 +93,7 @@ async function getChapters(url) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getChapterImages(url) {
|
async function extractImages(url) {
|
||||||
const results = [];
|
const results = [];
|
||||||
try {
|
try {
|
||||||
const fullUrl = url + "/images?is_prev=False¤t_page=1&reading_style=long_strip";
|
const fullUrl = url + "/images?is_prev=False¤t_page=1&reading_style=long_strip";
|
||||||
|
|||||||
Reference in New Issue
Block a user