Feat: resolveUrl, add neobook (#803)

* neobook

* add qs

* fix

* /

* fix

* expandURL -> resolveUrl

* fix Agitoon

* Update ranobelib.ts

---------

Co-authored-by: nyagami <hoangquan05112002@gmail.com>
This commit is contained in:
Rider21
2024-02-28 16:22:20 +03:00
committed by GitHub
parent 9b1417954f
commit bc17c5f576
24 changed files with 854 additions and 285 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ import { load as parseHTML } from "cheerio";
import { fetchApi, fetchFile } from "@libs/fetch";
import { Plugin } from "@typings/plugin";
import { Filters, FilterTypes } from "@libs/filterInputs";
import qs from "qs";
class NovelsOnline implements Plugin.PluginBase {
id = "NO.net";
@@ -115,7 +116,7 @@ class NovelsOnline implements Plugin.PluginBase {
"application/x-www-form-urlencoded; charset=UTF-8",
},
method: "POST",
body: "q=" + encodeURIComponent(searchTerm),
body: qs.stringify({ q: searchTerm }),
},
).then((res) => res.text());
+2 -1
View File
@@ -2,6 +2,7 @@ import { Plugin } from "@typings/plugin";
import { fetchApi, fetchFile } from "@libs/fetch";
import { NovelStatus } from "@libs/novelStatus";
import { load as parseHTML } from "cheerio";
import qs from "qs";
class FreeWebNovel implements Plugin.PluginBase {
id = "FWN.com";
@@ -92,7 +93,7 @@ class FreeWebNovel implements Plugin.PluginBase {
Origin: this.site,
},
method: "POST",
body: "searchkey=" + encodeURIComponent(searchTerm),
body: qs.stringify({ searchkey: searchTerm }),
}).then((res) => res.text());
const loadedCheerio = parseHTML(body);