Add penguin squad (#1586)

* Add penguin squad

* Fix locked chapter detection
This commit is contained in:
Adam Kemish
2025-03-18 17:04:59 +08:00
committed by GitHub
parent 447947faa5
commit b8ef5f19a8
3 changed files with 17 additions and 1 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

+8
View File
@@ -23,5 +23,13 @@
"options": { "options": {
"browsePage": "stories" "browsePage": "stories"
} }
},
{
"id": "penguinsquad",
"sourceSite": "https://penguin-squad.com",
"sourceName": "Penguin Squad",
"options": {
"browsePage": "novels"
}
} }
] ]
+9 -1
View File
@@ -90,7 +90,7 @@ class FictioneerPlugin implements Plugin.PluginBase {
.replace('by ', '') .replace('by ', '')
.trim(); .trim();
novel.cover = loadedCheerio('figure.story__thumbnail > a').attr('href'); novel.cover = loadedCheerio('figure.story__thumbnail > a').attr('href');
novel.genres = loadedCheerio('div.tag-group > a') novel.genres = loadedCheerio('div.tag-group > a, section.tag-group > a')
.map((i, el) => loadedCheerio(el).text()) .map((i, el) => loadedCheerio(el).text())
.toArray() .toArray()
.join(','); .join(',');
@@ -98,6 +98,14 @@ class FictioneerPlugin implements Plugin.PluginBase {
novel.chapters = loadedCheerio('li.chapter-group__list-item._publish') novel.chapters = loadedCheerio('li.chapter-group__list-item._publish')
.filter((i, el) => !el.attribs['class'].includes('_password')) .filter((i, el) => !el.attribs['class'].includes('_password'))
.filter(
(i, el) =>
!loadedCheerio(el)
.find('i')
.first()!
.attr('class')!
.includes('fa-lock'),
)
.map((i, el) => { .map((i, el) => {
const chapterName = loadedCheerio(el).find('a').text(); const chapterName = loadedCheerio(el).find('a').text();
const chapterUrl = loadedCheerio(el) const chapterUrl = loadedCheerio(el)