Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

12306的相关路由无法使用 #2923

Closed
umm233 opened this issue Aug 24, 2019 · 1 comment · Fixed by #2925
Closed

12306的相关路由无法使用 #2923

umm233 opened this issue Aug 24, 2019 · 1 comment · Fixed by #2925
Labels
RSS bug Something isn't working

Comments

@umm233
Copy link
Contributor

umm233 commented Aug 24, 2019

路由地址

/12306/zxdt/:id?
访问链接:https://rsshub.app/12306/zxdt

预期是什么?

12306公告的最新动态

实际发生了什么?

直接报错

额外信息(日志、报错等)

TypeError: Cannot read property 'trim' of null
    at /data/wwwroot/rsshub.app/lib/routes/12306/zxdt.js:57:21
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
    at async Promise.all (index 17)
    at async module.exports (/data/wwwroot/rsshub.app/lib/routes/12306/zxdt.js:38:17)
    at async cache (/data/wwwroot/rsshub.app/lib/middleware/cache.js:262:9)
    at async module.exports (/data/wwwroot/rsshub.app/lib/middleware/parameter.js:8:5)
    at async module.exports (/data/wwwroot/rsshub.app/lib/middleware/template.js:15:5)
    at async /data/wwwroot/rsshub.app/lib/middleware/api-response-handler.js:143:9
    at async module.exports (/data/wwwroot/rsshub.app/lib/middleware/api-template.js:2:5)
    at async module.exports (/data/wwwroot/rsshub.app/lib/middleware/utf8.js:4:5)
    at async module.exports (/data/wwwroot/rsshub.app/lib/middleware/debug.js:14:5)
    at async module.exports (/data/wwwroot/rsshub.app/lib/middleware/access-control.js:36:13)
    at async module.exports (/data/wwwroot/rsshub.app/lib/middleware/header.js:20:5)
    at async module.exports (/data/wwwroot/rsshub.app/lib/middleware/onerror.js:5:9)
@DIYgod DIYgod added the RSS bug Something isn't working label Aug 24, 2019
@umm233
Copy link
Contributor Author

umm233 commented Aug 24, 2019

不加参数已经可以使用,但加上路由参数,出现类似问题,如访问https://rsshub.app/12306/zxdt/4

TypeError: Cannot read property 'trim' of null at /app/lib/routes/12306/zxdt.js:57:21 at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:85:5) at async Promise.all (index 19) at async module.exports (/app/lib/routes/12306/zxdt.js:38:17) at async cache (/app/lib/middleware/cache.js:262:9) at async module.exports (/app/lib/middleware/parameter.js:8:5) at async module.exports (/app/lib/middleware/template.js:15:5) at async /app/lib/middleware/api-response-handler.js:143:9 at async module.exports (/app/lib/middleware/api-template.js:2:5) at async module.exports (/app/lib/middleware/utf8.js:4:5) at async module.exports (/app/lib/middleware/debug.js:14:5) at async module.exports (/app/lib/middleware/access-control.js:36:13) at async module.exports (/app/lib/middleware/header.js:20:5) at async module.exports (/app/lib/middleware/onerror.js:5:9)

对于没有动态(内容)的页面,直接报错,如访问 https://rsshub.app/12306/zxdt/3

Error: this route is empty, please check the original site or create an issue on https://github.com/DIYgod/RSSHub/issues/new/choose at module.exports (/app/lib/middleware/parameter.js:15:15) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:85:5) at async module.exports (/app/lib/middleware/template.js:15:5) at async /app/lib/middleware/api-response-handler.js:143:9 at async module.exports (/app/lib/middleware/api-template.js:2:5) at async module.exports (/app/lib/middleware/utf8.js:4:5) at async module.exports (/app/lib/middleware/debug.js:14:5) at async module.exports (/app/lib/middleware/access-control.js:36:13) at async module.exports (/app/lib/middleware/header.js:20:5) at async module.exports (/app/lib/middleware/onerror.js:5:9)

@DIYgod

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RSS bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants