fix: remove user agent (#695)

This commit is contained in:
nyagami
2024-01-18 20:32:01 +07:00
committed by GitHub
parent 402052bb22
commit cd3d96937a
116 changed files with 769 additions and 417 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ class AllNovelFullPlugin implements Plugin.PluginBase {
icon = "src/en/allnovelfull/icon.png";
site = "https://allnovelfull.net";
version = "1.0.0";
userAgent = "";
parseNovels(loadedCheerio: CheerioAPI) {
const novels: Plugin.NovelItem[] = [];
+1 -1
View File
@@ -11,7 +11,7 @@ class BLN implements Plugin.PluginBase {
site = "https://bestlightnovel.com/";
filter?: undefined;
version = "1.0.0";
userAgent = "";
async popularNovels(
pageNo: number,
+1 -1
View File
@@ -10,7 +10,7 @@ class ComradeMaoPlugin implements Plugin.PluginBase {
site = "https://comrademao.com/";
version = "1.0.0";
icon = "src/en/comrademao/icon.png";
userAgent = "";
parseNovels(loadedCheerio: CheerioAPI) {
const novels: Plugin.NovelItem[] = [];
+1 -1
View File
@@ -10,7 +10,7 @@ class DDLPlugin implements Plugin.PluginBase {
site = "https://www.divinedaolibrary.com/";
version = "1.0.0";
icon = "src/en/divinedaolibrary/icon.png";
userAgent = "";
parseNovels(loadedCheerio: CheerioAPI, searchTerm?: string){
let novels: Plugin.NovelItem[] = [];
+1 -1
View File
@@ -11,7 +11,7 @@ class EarlyNovelPlugin implements Plugin.PluginBase {
version = "1.0.0";
icon = "multisrc/madara/icons/latestnovel.png";
site = "https://earlynovel.net/";
userAgent = "";
parseNovels(loadedCheerio: CheerioAPI){
const novels: Plugin.NovelItem[] = [];
-119
View File
@@ -1,119 +0,0 @@
import { load as parseHTML } from "cheerio";
import { fetchApi, fetchFile } from "@libs/fetch";
import { FilterTypes, Filters } from "@libs/filterInputs";
import { Plugin } from "@typings/plugin";
class FTest implements Plugin.PluginBase {
id = "ftest";
name = "Filter Test";
icon = "src/en/noblemtl/icon.png";
site = "https://noblemtl.com/";
version = "1.0.0";
userAgent = "";
async popularNovels(
pageNo: number,
{ filters }: Plugin.PopularNovelsOptions<typeof this.filters>
): Promise<Plugin.NovelItem[]> {
return [];
}
async parseNovelAndChapters(novelUrl: string): Promise<Plugin.SourceNovel> {
return { url: "" };
}
async parseChapter(chapterUrl: string): Promise<string> {
return "Empty chapter";
}
async searchNovels(
searchTerm: string,
pageNo?: number | undefined
): Promise<Plugin.NovelItem[]> {
return [];
}
async fetchImage(url: string): Promise<string | undefined> {
return await fetchFile(url);
}
filters = {
picker: {
type: FilterTypes.Picker,
label: "Picker",
options: [
{ label: "A", value: "a" },
{ label: "B", value: "b" },
],
value: "a",
},
nd_picker: {
type: FilterTypes.Picker,
label: "ND_Picker",
options: [
{ label: "A", value: "a" },
{ label: "B", value: "b" },
],
value: "b",
},
checkbox: {
type: FilterTypes.CheckboxGroup,
label: "Checkbox",
options: [
{ label: "A", value: "a" },
{ label: "B", value: "b" },
],
value: [],
},
nd_checkbox: {
type: FilterTypes.CheckboxGroup,
label: "ND_Checkbox",
options: [
{ label: "A", value: "a" },
{ label: "B", value: "b" },
],
value: ["a"],
},
switch: {
type: FilterTypes.Switch,
label: "Switch",
value: false,
},
nd_switch: {
type: FilterTypes.Switch,
label: "ND_Switch",
value: true,
},
text: {
type: FilterTypes.TextInput,
label: "Text",
value: "",
},
nd_text: {
type: FilterTypes.TextInput,
label: "ND_Text",
value: "some default value",
},
xcheckbox: {
type: FilterTypes.ExcludableCheckboxGroup,
label: "XCheckbox",
options: [
{ label: "A", value: "a" },
{ label: "C", value: "c" },
{ label: "B", value: "b" },
],
value: {},
},
nd_xcheckbox: {
type: FilterTypes.ExcludableCheckboxGroup,
label: "ND_XCheckbox",
options: [
{ label: "A", value: "a" },
{ label: "C", value: "c" },
{ label: "B", value: "b" },
],
value: { exclude: ["a"], include: ["b"] },
},
} satisfies Filters;
}
const Test = new FTest();
+1 -1
View File
@@ -9,7 +9,7 @@ class FreeWebNovel implements Plugin.PluginBase {
site = "https://freewebnovel.com";
version = "1.0.0";
icon = "src/en/freewebnovel/icon.png";
userAgent = "";
async popularNovels(
+1 -1
View File
@@ -9,7 +9,7 @@ class NobleMTL implements Plugin.PluginBase {
icon = "src/en/noblemtl/icon.png";
site = "https://noblemtl.com/";
version = "1.0.0";
userAgent = "";
async popularNovels(
pageNo: number,
+1 -1
View File
@@ -9,7 +9,7 @@ class PandaMTL implements Plugin.PluginBase {
icon = "src/en/wordpress/icon.png";
site = "https://pandamtl.com/";
version = "1.0.0";
userAgent = "";
async popularNovels(
pageNo: number,