Add penguin squad (#1586)
* Add penguin squad * Fix locked chapter detection
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
@@ -23,5 +23,13 @@
|
|||||||
"options": {
|
"options": {
|
||||||
"browsePage": "stories"
|
"browsePage": "stories"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "penguinsquad",
|
||||||
|
"sourceSite": "https://penguin-squad.com",
|
||||||
|
"sourceName": "Penguin Squad",
|
||||||
|
"options": {
|
||||||
|
"browsePage": "novels"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user