fix(faqwikius): update url (#2212)
* fix(faqwikius): update site URL to include '/novel' for correct navigation * chore: bumped version of faqwiki * fix(faqwikius): remove script tags from parsed HTML to clean up novel data * fix(faqwikius): move the remove script tags from parseNovels method to parseNovel method * chore(faqwikius): rename parseNovels method to parseNovelList and parseNovel to parseNovelDetails for clarity * fix(faqwikius): reversion of previous commit
This commit is contained in:
@@ -6,8 +6,8 @@ import { NovelStatus } from '@libs/novelStatus';
|
|||||||
class FaqWikiUs implements Plugin.PluginBase {
|
class FaqWikiUs implements Plugin.PluginBase {
|
||||||
id = 'FWK.US';
|
id = 'FWK.US';
|
||||||
name = 'Faq Wiki';
|
name = 'Faq Wiki';
|
||||||
site = 'https://faqwiki.us/';
|
site = 'https://faqwiki.us/novel';
|
||||||
version = '2.0.1';
|
version = '3.0.1';
|
||||||
icon = 'src/en/faqwikius/icon.png';
|
icon = 'src/en/faqwikius/icon.png';
|
||||||
|
|
||||||
parseNovels(loadedCheerio: CheerioAPI, searchTerm?: string) {
|
parseNovels(loadedCheerio: CheerioAPI, searchTerm?: string) {
|
||||||
@@ -57,6 +57,7 @@ class FaqWikiUs implements Plugin.PluginBase {
|
|||||||
async parseNovel(path: string): Promise<Plugin.SourceNovel> {
|
async parseNovel(path: string): Promise<Plugin.SourceNovel> {
|
||||||
const body = await fetchApi(this.site + path).then(res => res.text());
|
const body = await fetchApi(this.site + path).then(res => res.text());
|
||||||
const loadedCheerio = parseHTML(body);
|
const loadedCheerio = parseHTML(body);
|
||||||
|
loadedCheerio('script').remove();
|
||||||
|
|
||||||
const novel: Plugin.SourceNovel = {
|
const novel: Plugin.SourceNovel = {
|
||||||
path,
|
path,
|
||||||
|
|||||||
Reference in New Issue
Block a user