Feat: ImageRequestInit (#979)
* add ImageRequestInit & fix Hako * remove multisrc fetchFile * remove plugins fetchFile * update docs and template file
This commit is contained in:
@@ -9,6 +9,11 @@ class NovelBin implements Plugin.PluginBase {
|
||||
icon = 'src/en/novelbin/icon.png';
|
||||
site = 'https://binnovel.com/';
|
||||
version = '1.0.1';
|
||||
imageRequestInit?: Plugin.ImageRequestInit | undefined = {
|
||||
headers: {
|
||||
'referrer': this.site,
|
||||
},
|
||||
};
|
||||
parseNovels(loadedCheerio: CheerioAPI) {
|
||||
const novels: Plugin.NovelItem[] = [];
|
||||
|
||||
@@ -143,14 +148,6 @@ class NovelBin implements Plugin.PluginBase {
|
||||
return this.parseNovels(loadedCheerio);
|
||||
}
|
||||
|
||||
async fetchImage(url: string): Promise<string | undefined> {
|
||||
return fetchFile(url, {
|
||||
headers: {
|
||||
'referrer': this.site,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
filters = {
|
||||
sort: {
|
||||
value: 'popular-novels',
|
||||
|
||||
Reference in New Issue
Block a user