DIYgod mirror
Go to file
Alex 2ca1b3afa5
feat(route): add Wikipedia current events (#20100)
* feat(route): add Wikipedia current events

Add RSS feed for Wikipedia Portal:Current events providing the past 7 days of current events. Parses MediaWiki templates and converts wiki markup to HTML.

- Hierarchical bullet point structures with nested <ul>/<li> tags
- Proper paragraph breaks between sections
- Correct nesting depth for multi-level lists
- Clean separation of content sections

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor(route/wikipedia): break down complex wikiToHtml function

- Split 123-line wikiToHtml function into 6 smaller, focused methods
- Each function now has a single responsibility (links, formatting, lists, etc.)
- Improved code readability and maintainability
- End-to-end tested: route produces identical RSS output with proper HTML formatting

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(route/wikipedia): use config.trueUA instead of hardcoded User-Agent

Replace hardcoded User-Agent string with config.trueUA to follow
project conventions for HTTP requests.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(route/wikipedia): use config.cache.contentExpire for cache duration

Replace hardcoded 6-hour cache duration with configurable contentExpire
setting to follow project caching conventions.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat(route/wikipedia): implement efficient current events RSS with single API request

- Switch from web scraping to MediaWiki API for better reliability
- Implement single batch API request with continuation support for multiple pages
- Add current-day inclusion parameter with time-based logic (auto/always/never/hour)
- Add proper error handling and ESLint compliance

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor(route/wikipedia): consolidate list processing and add API documentation

- Move wrapListItems and processNestedLists calls inside (renamed) processListsAndLines to eliminate non-obvious coupling
- Remove newlines from processNestedLists output for more compact HTML
- Add documentation about Wikipedia API endpoints and query options

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-21 22:12:30 +08:00
.devcontainer feat(utils/puppeteer): replace `puppeteer-extra-plugin-stealth` with `rebrowser` (#19506) 2025-07-01 04:38:05 +08:00
.github chore(github): update bug report templates 2025-09-16 01:52:58 +08:00
.husky chore(deps-dev): bump husky from 9.0.11 to 9.1.0 (#16200) 2024-07-18 20:04:24 +08:00
.idx feat(utils/puppeteer): replace `puppeteer-extra-plugin-stealth` with `rebrowser` (#19506) 2025-07-01 04:38:05 +08:00
assets
lib feat(route): add Wikipedia current events (#20100) 2025-09-21 22:12:30 +08:00
logs
patches chore(deps-dev): fix docker builds due to rolldown-plugin-dts in f73ef0e1f6 (#19901) 2025-08-26 02:16:45 +08:00
plugins feat: compile ts through tsdown (#18908) 2025-04-22 22:29:11 +08:00
scripts chore: vercel sync 2025-08-11 14:15:16 +08:00
.codecov.yml
.dockerignore chore: add eslint & vitest config file to dockerignore 2024-07-09 20:06:37 +08:00
.editorconfig
.gitignore chore: sort git ignore 2025-04-16 03:59:36 +08:00
.gitpod.yml feat(utils/puppeteer): replace `puppeteer-extra-plugin-stealth` with `rebrowser` (#19506) 2025-07-01 04:38:05 +08:00
.npmrc chore: set package-manager-strict to false 2024-05-24 02:46:38 +00:00
.prettierignore feat: compile ts through tsdown (#18908) 2025-04-22 22:29:11 +08:00
.prettierrc
.puppeteerrc.cjs refactor: fix lint issue (#18963) 2025-04-29 03:00:16 +08:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md fix(core): fix documentation link path and error message links (#15023) 2024-03-30 08:12:12 +00:00
Dockerfile feat(utils/puppeteer): replace `puppeteer-extra-plugin-stealth` with `rebrowser` (#19506) 2025-07-01 04:38:05 +08:00
LICENSE
README.md docs: fix visitors count 2025-04-28 04:40:10 +08:00
SECURITY.md
app.json
babel.config.js
docker-compose.yml feat: Refer to ghcr.io in docker-compose (#19743) 2025-08-04 17:18:52 +08:00
eslint.config.mjs chore(eslint): update Node.js built-ins rule version to >=22.16.0 2025-09-15 21:17:23 +08:00
fly.toml chore: update fly.toml 2025-06-06 21:38:15 +08:00
package.json chore(deps-dev): bump eslint-plugin-n from 17.23.0 to 17.23.1 (#20105) 2025-09-19 08:14:12 +00:00
pnpm-lock.yaml chore(deps-dev): bump eslint-plugin-n from 17.23.0 to 17.23.1 (#20105) 2025-09-19 08:14:12 +00:00
tailwind.config.js
tsconfig.json chore: add Vercel build configuration 2025-08-10 18:34:16 +08:00
tsdown-vercel.config.ts feat: vercel compatibility 2025-08-11 21:39:03 +08:00
tsdown.config.ts feat: vercel compatibility 2025-08-11 21:39:03 +08:00
vitest.config.ts test: fix exclude 2024-03-31 23:33:31 +08:00

README.md

RSSHub

RSSHub

🧡 Everything is RSSible

docker publish npm publish test Test coverage Visitors

Telegram group Telegram channel X (Twitter)

Introduction

RSSHub is the world's largest RSS network, consisting of over 5,000 global instances.

RSSHub delivers millions of contents aggregated from all kinds of sources, our vibrant open source community is ensuring the deliver of RSSHub's new routes, new features and bug fixes.

Documentation | Telegram Group | Telegram Channel | X (Twitter)

  • RSSHub Radar | A browser extension that can help you quickly discover and subscribe to the RSS and RSSHub of current websites.
  • RSSBud | RSSHub Radar for iOS platform, designed specifically for mobile ecosystem optimization.
  • RSSAid | RSSHub Radar for Android platform built with Flutter.
  • DocSearch | Link RSSHub DocSearch into Raycast

Contribute

We welcome all pull requests. Suggestions and feedback are also welcomed here.

Refer to Quick Start

Deployment

Refer to Deployment

Special Thanks

Logo designer sheldonrrr

              

Author

RSSHub © DIYgod, Released under the MIT License.
Authored and maintained by DIYgod with help from contributors (list).

Blog @DIYgod · GitHub @DIYgod · X (Twitter) @DIYgod · Telegram Channel @awesomeDIYgod