fix: linter issues
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { CheerioAPI, load as parseHTML } from 'cheerio';
|
||||
import { fetchApi } from '@libs/fetch';
|
||||
import { fetchApi, FetchInit } from '@libs/fetch';
|
||||
import { Plugin } from '@/types/plugin';
|
||||
import { Filters, FilterTypes } from '@libs/filterInputs';
|
||||
|
||||
@@ -8,11 +8,11 @@ class NovelsOnline implements Plugin.PluginBase {
|
||||
name = 'novelsOnline';
|
||||
site = 'https://novelsonline.org';
|
||||
icon = 'src/en/novelsonline/icon.png';
|
||||
version = '1.0.1';
|
||||
version = '1.0.2';
|
||||
|
||||
async safeFetch(
|
||||
url: string,
|
||||
init: any | undefined = undefined,
|
||||
init: FetchInit | undefined = undefined,
|
||||
): Promise<CheerioAPI> {
|
||||
const r = await fetchApi(url, init);
|
||||
if (!r.ok)
|
||||
@@ -131,12 +131,14 @@ class NovelsOnline implements Plugin.PluginBase {
|
||||
.join(', ');
|
||||
break;
|
||||
case 'Artist(s)':
|
||||
const artist = detail
|
||||
.find('li')
|
||||
.map((_, el) => $(el).text())
|
||||
.get()
|
||||
.join(', ');
|
||||
if (artist && artist != 'N/A') novel.artist = artist;
|
||||
{
|
||||
const artist = detail
|
||||
.find('li')
|
||||
.map((_, el) => $(el).text())
|
||||
.get()
|
||||
.join(', ');
|
||||
if (artist && artist != 'N/A') novel.artist = artist;
|
||||
}
|
||||
break;
|
||||
case 'Status':
|
||||
novel.status = detail.text().trim();
|
||||
|
||||
Reference in New Issue
Block a user