DIYgod / RSSHub

🧡 Everything is RSSible
https://docs.rsshub.app
MIT License
33.59k stars 7.51k forks source link

无法从知网获取指定作者的论文,网址中找不到作者对应code #16927

Open MHTC opened 1 month ago

MHTC commented 1 month ago

路由地址

/cnki/author/:code

完整路由地址

/cnki/author/v=2arE9-pF_S0Y7hb0cHlPRp6HzHHYimewr34yS7__J4rqsBZmwI06NfR1V087F_q40QfLPEfxo4crlKo8HAEV-piMYf4cn3WlNzqv8oMn7DTmi3xTOOSfFm9uU3o3-iRj

相关文档

https://docs.rsshub.app/zh/routes/journal

预期是什么?

从知网获取指定作者的论文列表

实际发生了什么?

无法从知网获取指定作者的论文,网址中找不到作者对应code

部署

自建

部署相关信息

CentOS 7.6 64bit

额外信息

Helpful Information

Error Message:
TypeError: Cannot read properties of undefined (reading 'location')

Route: /cnki/author/:code

Full Route: /cnki/author/v=2arE9-pF_S0Y7hb0cHlPRp6HzHHYimewr34yS7__J4rqsBZmwI06NfR1V087F_q40QfLPEfxo4crlKo8HAEV-piMYf4cn3WlNzqv8oMn7DTmi3xTOOSfFm9uU3o3-iRj

Node Version: v22.9.0

Git Hash: 94eacdf7

Git Date: Wed, 25 Sep 2024 13:09:00 GMT

这不是重复的 issue

github-actions[bot] commented 1 month ago
Searching for maintainers:

To maintainers: if you are not willing to be disturbed, list your username in scripts/workflow/test-issue/call-maintainer.js. In this way, your username will be wrapped in an inline code block when tagged so you will not be notified.

If all routes can not be found, the issue will be closed automatically. Please use NOROUTE for a route-irrelevant issue or leave a comment if it is a mistake. 如果所有路由都无法匹配,issue 将会被自动关闭。如果 issue 和路由无关,请使用 NOROUTE 关键词,或者留下评论。我们会重新审核。

github-actions[bot] commented 1 month ago
Searching for maintainers:

To maintainers: if you are not willing to be disturbed, list your username in scripts/workflow/test-issue/call-maintainer.js. In this way, your username will be wrapped in an inline code block when tagged so you will not be notified.

If all routes can not be found, the issue will be closed automatically. Please use NOROUTE for a route-irrelevant issue or leave a comment if it is a mistake. 如果所有路由都无法匹配,issue 将会被自动关闭。如果 issue 和路由无关,请使用 NOROUTE 关键词,或者留下评论。我们会重新审核。

AntiKnot commented 1 month ago

作者页面/author/detail,F12查看页面详情,搜索au-code

<input id="au-name" type="hidden" value="作者名">
<input id="au-code" type="hidden" value="00005xxxxxxx">
MHTC commented 1 month ago

找到code了,但还是不行 Helpful Information

Error Message: TypeError: Cannot read properties of undefined (reading 'location')

Route: /cnki/author/:code

Full Route: /cnki/author/000025612498

Node Version: v22.9.0

Git Hash: 94eacdf7

Git Date: Wed, 25 Sep 2024 13:09:00 GMT

harveyqiu commented 1 month ago

可以复现这个问题,是因为下面的这个url目前已经变成需要登录才能访问了。

const authorInfoUrl = `${rootUrl}/kcms/detail/knetsearch.aspx?sfield=au&code=${code}`;

之前用于爬取特定作者的url仍然是可用的,但如果需要调整的话需要直接改掉这个RSS的访问接口(从/cnki/author/000042423923变成/cnki/author/Dm4VI7mKrXN9i7uCJabkWbf29VEGci4n7-AN6IzhsNXd2Vveo3cHrQYPm4Qbg87qbYCHX8ia8G4j1wpkloki8N7LBPNQq0zXTTM9VXm6TQ8nDwEXJQ6CiNYizoE6pj_g):

const url = `${rootUrl}/restapi/knowledge-api/v1/experts/relations/resources?v=${code2}`;

目前还在考虑是否有其他的方式避免RSS访问接口的大幅调整