Repository navigation
feat(bangla): add Golper City (golpercity.blogspot.com) plugin - #2748
Conversation
Scrapes the Bangla novel blog Golper City using the Blogger JSON feed: labels are novels, posts are chapters in publish order. Co-Authored-By: opencode <ai@opencode.dev>
Needed so plugins/bangla plugins are picked up by build:manifest. Co-Authored-By: opencode <ai@opencode.dev>
[Medium impact] The changes reach one new reading source and its build listing. Fix the cover URL check before merging so EPUB export can finish. FindingsSummaryAdds Golper City as a Bangla source using Blogger labels for novels and feed posts for chapters.
Reviews (1) · Last reviewed commit: "chore(bangla): register Bangla language ..." · Reviewed by Greptile |
| resolveUrl(path: string): string { | ||
| const url = new URL(path, this.site); | ||
| if (url.origin !== this.site) | ||
| throw new Error('Golper City: invalid page address.'); |
There was a problem hiding this comment.
resolveUrl rejects external cover URLs. useEpubExport passes the novel's cover through this method before creating the file. Blogger thumbnails—and the defaultCover fallback—have a different origin, so the export throws after fetching the chapters. Allow absolute cover URLs here, and keep the same-origin check in the chapter-request path.
Knowledge Base Used: Plugin authoring contract
| 'script,style,iframe,noscript,form,.sharethis-inline-reaction-buttons', | ||
| ) | ||
| .remove(); | ||
| return content.html() || ''; |
There was a problem hiding this comment.
If an HTTP-success error page or changed layout has no div.post-body, parseChapter returns an empty string instead of an error. The reader accepts that result, and EPUB export substitutes “No content available.” Check that readable text or images remain after cleanup and throw when neither exists.
| return content.html() || ''; | |
| if (!content.text().trim() && !content.find('img').length) | |
| throw new Error('Golper City: no readable chapter content was found.'); | |
| return content.html() || ''; |
Knowledge Base Used: Plugin authoring contract
- Keep the API's leading <h1> in chapter bodies so readers see the chapter title (including its number) in the chapter header. - Add filter support to popularNovels/searchNovels via the search API: languages, status, sort_by, sort_order and adult content, with popular = popularity desc and Latest = last_updated desc. - Bump version to 1.1.0. Co-Authored-By: opencode <ai@opencode.dev>
…ilters" This reverts commit 7f594cf.
What
golpercity.blogspot.com), a Bangla novel blog (Golpo Hub's story host).scripts/languages.js(build:manifestonly walks folders listed there, so Bangla needed a row).How it works
plugins/english/seireitranslations.ts(same Blogger/JSON-feed mechanics): labels are novels, posts are chapters in publish order via the atom-in-JSON feed, chapter text fromdiv.post-body.public/static/src/bn/golpercity/icon.png.Validation performed
npm run check:plugin -- plugins/bangla/golpercity.ts→ all 4 live checks PASS (17 novels, search OK, 36 chapters for ভ্যাম্পায়ার কুইন সিজন ওয়ান, 5812-char chapter text).prettier --checkandnpm run lint: no issues from the new files.npm run build:compilepasses.npm run build:manifestoutput verified to includegolpercity(320 plugins; Bangla category present).Authored with the OpenCode AI agent (Co-Authored-By trailer in commits).