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
Binary file not shown.
|
After Width: | Height: | Size: 414 B |
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
@@ -349,7 +349,24 @@
|
|||||||
"sourceName": "WorldNovel",
|
"sourceName": "WorldNovel",
|
||||||
"options": {
|
"options": {
|
||||||
"useNewChapterEndpoint": true,
|
"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;
|
if (!novelName || !novelUrl) return;
|
||||||
const image = loadedCheerio(element).find('img');
|
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 = {
|
const novel: Plugin.NovelItem = {
|
||||||
name: novelName,
|
name: novelName,
|
||||||
cover: novelCover,
|
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-lazy-src') ||
|
||||||
loadedCheerio('.summary_image > a > img').attr('data-src') ||
|
loadedCheerio('.summary_image > a > img').attr('data-src') ||
|
||||||
loadedCheerio('.summary_image > a > img').attr('src') ||
|
loadedCheerio('.summary_image > a > img').attr('src') ||
|
||||||
loadedCheerio('.summary_image > a > img').attr('src') ||
|
|
||||||
defaultCover;
|
defaultCover;
|
||||||
|
|
||||||
loadedCheerio('.post-content_item, .post-content').each(function () {
|
loadedCheerio('.post-content_item, .post-content').each(function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user