RSSHub/lib
fishyo a8b004eb64
feat(route): add supercell game blog routes (#20545)
* feat(route): add supercell game blog routes

- Add support for 5 supercell games (Clash Royale, Brawl Stars, Clash of Clans, Boom Beach, Hay Day)
- Support 12 languages (en, zh, zh-hans, fr, de, id, it, ja, ko, pt, ru, es)
- Extract blog posts from __NEXT_DATA__ JSON
- Cache full article content with fallback to summary

* feat: add Supercell game blog route

* fix(supercell): use regex to extract __NEXT_DATA__ JSON, remove cheerio dependency

* fix(supercell): use bodyCollection to render content, fix namespace capitalization

* fix: improve supercell blog route to extract full content from bodyCollection

- Implement renderRichText and renderNodeContent functions to properly parse rich text JSON format
- Handle both TextBlock and FeatureBlock types from bodyCollection
- Support text formatting marks (bold, italic, underline, code)
- Add proper type annotations to handler function and variables
- Use Next.js JSON endpoint instead of HTML parsing for better performance
- Add error handling with fallback to description if full content extraction fails

* feat(supercell): add ImageBlock and CarouselBlock support for multi-game content extraction

* fix(supercell): use else-if chain and for-of loop for block handling

* refactor(supercell): extract renderBlock function to reduce complexity

* fix(supercell): use switch statement for block type handling
2025-12-04 23:59:51 +08:00
..
api style: format 2025-11-27 11:04:48 +08:00
assets
errors style: auto format 2025-11-27 05:54:33 +00:00
middleware style: auto format 2025-11-27 05:54:33 +00:00
routes feat(route): add supercell game blog routes (#20545) 2025-12-04 23:59:51 +08:00
routes-deprecated feat(route): add netflix (#20453) 2025-11-09 23:00:07 +08:00
utils style: auto format 2025-11-27 05:54:33 +00:00
views style: auto format 2025-11-27 02:55:46 +00:00
app-bootstrap.tsx style: auto format 2025-11-27 02:55:46 +00:00
app.test.ts style: auto format 2025-11-27 02:55:46 +00:00
app.ts
config.test.ts style: auto format 2025-11-27 02:55:46 +00:00
config.ts style: auto format 2025-11-27 02:55:46 +00:00
index.ts style: auto format 2025-11-27 02:55:46 +00:00
pkg.test.ts style: auto format 2025-11-27 02:55:46 +00:00
pkg.ts style: auto format 2025-11-27 05:54:33 +00:00
registry.test.ts style: auto format 2025-11-27 02:55:46 +00:00
registry.ts style: auto format 2025-11-27 05:54:33 +00:00
route-paths.d.ts fix(core): package mode (#20580) 2025-11-26 20:44:18 +08:00
router.js feat(route): add netflix (#20453) 2025-11-09 23:00:07 +08:00
routes.test.ts style: auto format 2025-11-27 02:55:46 +00:00
server.ts
setup.test.ts style: auto format 2025-11-27 02:55:46 +00:00
types.ts feat(route/telegram): Fix tglib (#18268) 2025-09-16 21:41:05 +08:00