Last step to Alpha (#710)
* fix: novelhall id * update readme * update: actions * fix: remove volume * fix: remove showToast
This commit is contained in:
+573
-574
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,6 @@
|
||||
import { CheerioAPI, load as parseHTML } from "cheerio";
|
||||
import { fetchApi, fetchFile } from "@libs/fetch";
|
||||
import { FilterTypes, Filters } from "@libs/filterInputs";
|
||||
import { showToast } from "@libs/showToast";
|
||||
import { Plugin } from "@typings/plugin";
|
||||
import { defaultCover } from "@libs/defaultCover";
|
||||
|
||||
@@ -60,7 +59,6 @@ class EarlyNovelPlugin implements Plugin.PluginBase {
|
||||
}
|
||||
|
||||
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> {
|
||||
showToast("Early Novel may take 20-30 seconds");
|
||||
const url = novelUrl;
|
||||
const headers = new Headers();
|
||||
const result = await fetchApi(url, { headers });
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { load as parseHTML } from "cheerio";
|
||||
import { fetchApi, fetchFile } from "@libs/fetch";
|
||||
import { showToast } from "@libs/showToast";
|
||||
import { isUrlAbsolute } from "@libs/isAbsoluteUrl";
|
||||
import { Novel, Plugin } from "@typings/plugin";
|
||||
|
||||
@@ -117,8 +116,6 @@ export const parseChapter: Plugin.parseChapter = async function (chapterUrl) {
|
||||
};
|
||||
|
||||
export const searchNovels: Plugin.searchNovels = async function (searchTerm) {
|
||||
showToast("Search is not available in this source");
|
||||
|
||||
return [];
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { load as parseHTML } from "cheerio";
|
||||
import { fetchApi, fetchFile } from "@libs/fetch";
|
||||
import { showToast } from "@libs/showToast";
|
||||
import { Chapter, Novel, Plugin } from "@typings/plugin";
|
||||
|
||||
const pluginId = "lnmtl";
|
||||
@@ -36,8 +35,6 @@ export const popularNovels: Plugin.popularNovels = async function (page) {
|
||||
|
||||
export const parseNovelAndChapters: Plugin.parseNovelAndChapters =
|
||||
async function (novelUrl) {
|
||||
showToast("LNMTL might take around 20-30 seconds.");
|
||||
|
||||
const url = novelUrl;
|
||||
|
||||
const body = await fetchApi(url, {}, pluginId).then((r) => r.text());
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Plugin } from "@typings/plugin";
|
||||
import { Filters } from "@libs/filterInputs";
|
||||
|
||||
class NovelHall implements Plugin.PluginBase {
|
||||
id = "novelhold";
|
||||
id = "novelhall";
|
||||
name = "Novel Hall";
|
||||
version = "1.0.0";
|
||||
icon = "src/en/novelhall/icon.png";
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { CheerioAPI, load as parseHTML } from "cheerio";
|
||||
import { load as parseHTML } from "cheerio";
|
||||
import { fetchApi, fetchFile } from "@libs/fetch";
|
||||
import { FilterTypes, Filters } from "@libs/filterInputs";
|
||||
import { Plugin } from "@typings/plugin";
|
||||
import { showToast } from "@libs/showToast";
|
||||
import { defaultCover } from "@libs/defaultCover";
|
||||
import { NovelStatus } from "@libs/novelStatus";
|
||||
|
||||
@@ -116,8 +115,6 @@ class TuNovelaLigera implements Plugin.PluginBase {
|
||||
const getChapters = async () => {
|
||||
const n = url.split("/");
|
||||
const novelName = n[4];
|
||||
showToast("Cargando desde Archivo...");
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append("action", "madara_load_more");
|
||||
formData.append("page", "0");
|
||||
@@ -158,7 +155,6 @@ class TuNovelaLigera implements Plugin.PluginBase {
|
||||
const getPageChapters = async () => {
|
||||
for (let i = 1; i <= lastPage; i++) {
|
||||
const chaptersUrl = `${novelUrl}?lcp_page0=${i}`;
|
||||
showToast(`Cargando desde la página ${i}/${lastPage}...`);
|
||||
const result = await fetchApi(chaptersUrl, { headers });
|
||||
const chaptersHTML = await result.text();
|
||||
|
||||
@@ -193,7 +189,6 @@ class TuNovelaLigera implements Plugin.PluginBase {
|
||||
novel.chapters = await getChapters();
|
||||
|
||||
if (!novel.chapters.length) {
|
||||
showToast("¡Archivo no encontrado!");
|
||||
await delay(1000);
|
||||
novel.chapters = await getPageChapters();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user