Updated novels.yaml and loader.ts
This commit is contained in:
@@ -30,14 +30,6 @@ novels:
|
|||||||
selectors:
|
selectors:
|
||||||
content:
|
content:
|
||||||
scope: ".epcontent"
|
scope: ".epcontent"
|
||||||
stealth:
|
|
||||||
enabled: true
|
|
||||||
addons:
|
|
||||||
- "uBlock0_1.67.0.firefox.signed.xpi"
|
|
||||||
steps:
|
|
||||||
- type: waitForElement
|
|
||||||
selector: "#list-chapter .chapter-archive-grid"
|
|
||||||
timeoutMs: 15000
|
|
||||||
download:
|
download:
|
||||||
parallelism: 4
|
parallelism: 4
|
||||||
minContentBytes: 10
|
minContentBytes: 10
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ export function loadNovelsConfig(): NovelsConfig {
|
|||||||
if (novel.type !== 'epub' && novel.type !== 'web-scraped') {
|
if (novel.type !== 'epub' && novel.type !== 'web-scraped') {
|
||||||
throw new Error(`Novel "${novel.slug}" has unknown type "${novel.type}"`);
|
throw new Error(`Novel "${novel.slug}" has unknown type "${novel.type}"`);
|
||||||
}
|
}
|
||||||
if (!novel.source?.url && !novel.source?.urls?.length) {
|
if (!novel.source?.url && !novel.source?.urls?.length && !novel.source?.urlTemplate) {
|
||||||
throw new Error(`Novel "${novel.slug}" missing source.url or source.urls`);
|
throw new Error(`Novel "${novel.slug}" missing source: provide url (TOC strategy), urls (epub), or urlTemplate (increment strategy)`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user