Commit Graph

52 Commits

Author SHA1 Message Date
github-actions[bot] ebfe021b50 style: auto format 2026-04-14 15:15:05 +00:00
github-actions[bot] a28890a135 style: auto format 2025-11-27 02:55:46 +00:00
DIYgod f51da43fb7
feat(errors): add CaptchaError handling and related tests
- Introduced a new CaptchaError class to handle captcha-related errors.
- Updated the dynamic route to throw CaptchaError when encountering specific error codes.
- Added tests for CaptchaError to ensure proper error handling in the API.
2025-08-22 15:17:16 +08:00
github-actions[bot] 25f8cd5e63 style: auto format 2025-08-14 02:55:48 +00:00
DIYgod 8520db3e13
feat: api route (#19209)
* feat: api route

* test: api route
2025-05-27 13:21:27 +08:00
dependabot[bot] 8a0efc0ba2
chore(deps-dev): bump eslint-plugin-unicorn from 56.0.1 to 57.0.0 (#18392)
* chore(deps-dev): bump eslint-plugin-unicorn from 56.0.1 to 57.0.0

Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 56.0.1 to 57.0.0.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v56.0.1...v57.0.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-unicorn
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: remove unicorn plugin

* style: fix eslint issues

* style: fix more issues

* chore: flat config unicorn

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tony <TonyRL@users.noreply.github.com>
2025-02-19 05:10:11 +08:00
DIYgod 91d9acc68b
fix: redirection in router handler 2024-11-12 20:14:04 +08:00
pseudoyu 0a42f88de7
feat(route): add lang field in route namespace 2024-11-01 22:09:31 +07:00
CaoMeiYouRen ed8b868432
feat(middleware): 优化 多媒体处理增加 data.image/item.enclosure_url/item.image… (#16610)
* feat(middleware): 优化 多媒体处理增加 data.image/item.enclosure_url/item.image/item.itunes_item_image 等字段

* test(middleware): 补充 anti-hotlink 缺失的测试用例
2024-09-05 20:47:53 +08:00
COxDE 2962c6f64f
feat(middleware): process feed title and description using LLM (#16464)
* feat(middleware): add title translation using LLM

* refactor: combine title and description

* fix: camelCase for variables

* refactor: try to update the test case

---------
2024-08-22 02:15:00 +08:00
DIYgod 590827949b
test: url error 2024-07-13 00:20:11 +08:00
DIYgod 99bf04cfad
feat: proxy strategy 2024-07-13 00:15:41 +08:00
DIYgod d1dd8a53ca
feat: retry requesting control (#15717)
* feat: retry requesting control

* test: fix error handling test
2024-05-26 21:48:29 +08:00
DIYgod 61e0ae13d9
Revert "feat: split test routes"
This reverts commit c265a0616a.
2024-05-26 17:22:13 +08:00
DIYgod c265a0616a
feat: split test routes 2024-05-26 16:52:39 +08:00
Rongrong a99b35f257
feat(core/utils/wechat-mp): major rewrite (#15276)
* feat(core/utils/wechat-mp): major rewrite

* Support more `item_show_type`: `APP_MSG_PAGE`, `VIDEO_SHARE_PAGE`,
`AUDIO_SHARE_PAGE`, and `IMG_SHARE_PAGE`. Previously only the first one
could be parsed properly. There are still some other known types waiting
for live examples for further adaptation. If this is the case, a
fallback method will try to generate entries using mostly OpenGraph
metadata. Meanwhile, the administrator of self-hosted instances will see
warnings in the log, asking them to report the URL as a new live
example. Still, `VIDEO_SHARE_PAGE` explicitly uses the fallback method
without any warning, as there is no possible approach to generate a
video/iframe URL from page metadata.

* Show audio and videos in `APP_MSG_PAGE`. However, not all videos
can be shown due to the same reason as `VIDEO_SHARE_PAGE`.

* Show the location where the article is sent.

* Some bugs, mostly due to outdated cheerio selector, are fixed.

* Add a new sub-route `wechat-mp` to `/test` to make things easier.

* All changes are well-tested.

Signed-off-by: Rongrong <i@rong.moe>

* style(core/utils/wechat-mp): fix ESLint & CodeQL errors

Signed-off-by: Rongrong <i@rong.moe>

* style(core/utils/wechat-mp): fix a DeepScan issue

Signed-off-by: Rongrong <i@rong.moe>

* style(core/utils/wechat-mp): fix ESLint error

Another try w/ pre-commit hook disabled.

Signed-off-by: Rongrong <i@rong.moe>

---------

Signed-off-by: Rongrong <i@rong.moe>
2024-04-18 22:05:32 +08:00
DIYgod c145a72590
test: add invalid-parameter-error and config-not-found-error 2024-04-07 17:46:46 +08:00
DIYgod b774c60858
test: add full routes test (#14934)
* test: add critical routes test

* fix: youtube channels config

* test: add full routes test

* test: output full routes test result

* test: build routes before test

* test: use one reporter

* test: fix cache test errors

* test: fix cache test errors

* chore: puppeteerrc.cjs

* chore: puppeteerrc.cjs

* chore: puppeteerrc.cjs

* fix: build script

* chore: puppeteerrc rename

* test: route test names

* chore: pass test result to docs
2024-03-24 19:00:03 +08:00
DIYgod d83c85a349
feat: remove radar.ts maintainer.ts router.ts 2024-03-09 18:31:48 +08:00
DIYgod 45f9ea21fb
feat: add routes 2024-03-09 03:06:53 +08:00
DIYgod f8b141ee6e
feat: add namespace.ts 2024-03-09 01:53:22 +08:00
Tony 1bdef0171b
fix(anti-hotlink): skip base64 image (#14676)
* fix(anti-hotlink): skip base64 image

* test: fix parameter complicated_description
2024-03-06 02:35:30 +08:00
Yufan You 130b11224e
chore: remove @ts-nocheck (#14669) 2024-03-05 21:06:03 +08:00
DIYgod 2c7d7f9205
feat: build-maintainer.ts 2024-03-04 01:38:38 +08:00
DIYgod 8065ededf5
feat: rename routes .js to .ts 2024-03-04 00:35:37 +08:00
DIYgod dee7da3105
feat: pure esm and typescript routes 2024-03-04 00:17:16 +08:00
DIYgod df57bb5d50
feat: esm standard for routes 2024-03-02 03:25:26 +08:00
DIYgod 6f57c02538
feat: rename routes dir - 2/2 2024-03-01 01:24:49 +08:00
NeverBehave 0792f7ba25
feat(core): first attempt to init script standard (#8224)
- lazy load
- rate limit per path
- init .debug.json support
- docs
- maintainer
- radar
2021-09-22 05:41:00 -07:00
DIYgod ed4725fa48
test: opencc 2020-09-25 01:43:59 +08:00
DIYgod 923b07eec4
test: filter and filterout combination cases 2020-06-08 17:59:04 +08:00
DIYgod 01636ce3b6
test: fix long title test 2020-03-18 10:32:57 +08:00
DIYgod 31726d4464
feat: support no refresh cache 2019-11-04 18:59:00 +08:00
DIYgod addd22c113
feat(core): handle link and pubDate parameter 2019-10-22 18:02:47 +08:00
DIYgod 8934686218
test: fix filter_time case 2019-09-19 19:19:01 +08:00
DIYgod 568441370d
test(pkg): pkg cases 2019-09-19 19:08:00 +08:00
DIYgod 4445443946
feat: use dynamical config 2019-09-18 17:45:21 +08:00
DIYgod 0af16097b3
feat: replace text 2019-09-04 14:28:29 +08:00
DIYgod b2355436cc
fix: url base 2019-08-28 15:50:05 +08:00
DIYgod 29f588e6a0
feat: handle description in parameter middleware 2019-08-28 12:06:50 +08:00
DIYgod 745eb0d52a
test: add template enclosure test cases 2019-08-23 15:44:52 +08:00
sanmmmm 914034760d feat: 新增自动提取全文输出 (#2738) 2019-08-02 17:22:58 +08:00
Henry Wang 9c837f1bc2 fix: retain allowEmpty in ctx.state (#2542)
* fix: retain allowEmpty in ctx.state

See: https://github.com/koajs/koa/issues/1172

* fix: pass test case allow_empty

* chore: get rid of eslint warning
2019-07-03 12:10:36 +08:00
DIYgod 8937882847
test: allowEmpty 2019-06-14 11:37:04 +08:00
DIYgod dea283d0bd
test: filter_time 2019-06-13 16:10:08 +08:00
DIYgod 58be5caf98
test: cache object 2019-06-13 16:01:12 +08:00
DIYgod 76add4785a
test: add empty item test case 2019-06-13 12:01:07 +08:00
DIYgod e2badbfa98
chore: module alias for all routes 2019-05-15 15:27:15 +08:00
DIYgod 075a8d1864
feat: support setting expire time for content cache 2019-05-09 01:11:19 +08:00
Henry Wang e1d91a591e del: line breaker handling in middleware (#1592)
* del: remove line breaker handling

As it's slowing down RSSHub drastically

* del: related test case

* feat: weibo line breaker handling
2019-02-21 15:24:55 +08:00