Repository navigation
1. Add Bookkor Korean source plugin - #2844
zephyr1wi-netizen wants to merge 5 commits into
Conversation
[Low impact] The PR adds a Bookkor source without changing existing plugin workflows. Fix the skipped chapter pages before merging; a temporary connection failure currently returns an incomplete list as success. FindingsSummaryAdds the Korean Bookkor source with category browsing, search, novel details, chapter paging, and chapter text extraction.
Reviews (1) · Last reviewed commit: "Delete plugins/korean/bookkor.ts" · Reviewed by Greptile |
| this.getHtml(`${novelPath}?page=${n}`) | ||
| .then(h => this.parseChapterPage(parseHTML(h))) | ||
| .catch(() => [] as RawChapter[]), |
There was a problem hiding this comment.
Failed pages leave chapter gaps
parseNovel turns failed page requests into empty chapter lists, then moves past those pages without retrying. If page 3 fails while the other pages load, its chapters are skipped. The remaining chapters are renumbered and returned as a successful result. Retry failed pages or let the request fail rather than returning an incomplete list.
| class BookkorPlugin implements Plugin.PluginBase { | ||
| id = 'bookkor'; | ||
| name = 'Bookkor (북코)'; | ||
| icon = 'src/korean/bookkor/icon.png'; |
There was a problem hiding this comment.
| .split('\n') | ||
| .map(l => l.trim()) | ||
| .filter(Boolean) | ||
| .map(l => `<p>${l}</p>`) |
There was a problem hiding this comment.
The plain-text fallback inserts decoded text directly into HTML. For example, source text <상태창> becomes <상태창> inside the returned paragraph, so the reader treats it as a tag instead of showing it. Escape each line before wrapping it in <p>.
| .map(l => `<p>${l}</p>`) | |
| .map(l => `<p>${l.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')}</p>`) |
Checklist
type(scope): description(e.g.feat(<generator>): add new source)