feat(plugins): Add Novel PDF and Hiraeth Translation (#907)
* feat(plugins): Add Novel PDF and Hiraeth Translation * feat(plugins): Add Icons * Rename Icons
This commit is contained in:
committed by
GitHub
parent
593fa2f206
commit
20b0d0b386
@@ -349,7 +349,24 @@
|
||||
"sourceName": "WorldNovel",
|
||||
"options": {
|
||||
"useNewChapterEndpoint": true,
|
||||
"lang":"French"
|
||||
"lang": "French"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "hiraethtranslation",
|
||||
"sourceSite": "https://hiraethtranslation.com/",
|
||||
"sourceName": "Hiraeth Translation",
|
||||
"options": {
|
||||
"useNewChapterEndpoint": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "novelpdf",
|
||||
"sourceSite": "https://novelpdf.xyz/",
|
||||
"sourceName": "Novel PDF",
|
||||
"options": {
|
||||
"useNewChapterEndpoint": true,
|
||||
"lang": "Thai"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
@@ -84,7 +84,10 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
'';
|
||||
if (!novelName || !novelUrl) return;
|
||||
const image = loadedCheerio(element).find('img');
|
||||
const novelCover = image.attr('data-src') || image.attr('src');
|
||||
const novelCover =
|
||||
image.attr('data-src') ||
|
||||
image.attr('src') ||
|
||||
image.attr('data-lazy-srcset');
|
||||
const novel: Plugin.NovelItem = {
|
||||
name: novelName,
|
||||
cover: novelCover,
|
||||
@@ -133,7 +136,6 @@ class MadaraPlugin implements Plugin.PluginBase {
|
||||
loadedCheerio('.summary_image > a > img').attr('data-lazy-src') ||
|
||||
loadedCheerio('.summary_image > a > img').attr('data-src') ||
|
||||
loadedCheerio('.summary_image > a > img').attr('src') ||
|
||||
loadedCheerio('.summary_image > a > img').attr('src') ||
|
||||
defaultCover;
|
||||
|
||||
loadedCheerio('.post-content_item, .post-content').each(function () {
|
||||
|
||||
Reference in New Issue
Block a user