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:
@@ -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,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);
|
||||
|
||||
Reference in New Issue
Block a user