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

fix(cnki): deprecate author articles with :code, now use :name and :company instead #17682

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Derekmini
Copy link
Contributor

@Derekmini Derekmini commented Nov 22, 2024

Involved Issue / 该 PR 相关 Issue

Close #16927

Example for the Proposed Route(s) / 路由地址示例

/cnki/author/丁晓东/中国人民大学

New RSS Route Checklist / 新 RSS 路由检查表

  • New Route / 新的路由
  • Anti-bot or rate limit / 反爬/频率限制
    • If yes, do your code reflect this sign? / 如果有, 是否有对应的措施?
  • Date and time / 日期和时间
    • Parsed / 可以解析
    • Correct time zone / 时区正确
  • New package added / 添加了新的包
  • Puppeteer

Note / 说明

需要使用国内或自建服务

@github-actions github-actions bot added the Route label Nov 22, 2024
@github-actions github-actions bot added the Auto: Route Test Complete Auto route test has finished on given PR label Nov 22, 2024
Copy link
Contributor

Successfully generated as following:

http://localhost:1200/cnki/author/丁晓东/中国人民大学 - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>FetchError: [POST] &quot;https://kns.cnki.net/kns8s/brief/grid&quot;: 404 Not Found
Route: /cnki/author/:name/:company
Full Route: /cnki/author/丁晓东/中国人民大学
Node Version: v22.11.0
Git Hash: 17c4e9bb

@Derekmini
Copy link
Contributor Author

Successfully generated as following:

http://localhost:1200/cnki/author/丁晓东/中国人民大学 - Failed ❌

需要使用国内或自建服务

Copy link
Contributor

Successfully generated as following:

http://localhost:1200/cnki/author/丁晓东/中国人民大学 - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>FetchError: [POST] &quot;https://kns.cnki.net/kns8s/brief/grid&quot;: 404 Not Found
Route: /cnki/author/:name/:company
Full Route: /cnki/author/丁晓东/中国人民大学
Node Version: v22.11.0
Git Hash: 17c4e9bb

Copy link
Contributor

Successfully generated as following:

http://localhost:1200/cnki/author/丁晓东/中国人民大学 - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>FetchError: [POST] &quot;https://kns.cnki.net/kns8s/brief/grid&quot;: 404 Not Found
Route: /cnki/author/:name/:company
Full Route: /cnki/author/丁晓东/中国人民大学
Node Version: v22.11.0
Git Hash: 17c4e9bb

@TonyRL TonyRL requested a review from Copilot November 22, 2024 13:15

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no suggestions.

author: authorName,
pubDate: date,
};
body: `boolSearch=true&QueryJson={"Platform":"","Resource":"CROSSDB","Classid":"WD0FTY92","Products":"","QNode":{"QGroup":[{"Key":"Subject","Title":"","Logic":0,"Items":[],"ChildItems":[{"Key":"input[data-tipid=gradetxt-1]","Title":"作者","Logic":0,"Items":[{"Key":"input[data-tipid=gradetxt-1]","Title":"作者","Logic":0,"Field":"AU","Operator":"DEFAULT","Value":"${name}","Value2":""}],"ChildItems":[]},{"Key":"input[data-tipid=gradetxt-2]","Title":"作者单位","Logic":0,"Items":[{"Key":"input[data-tipid=gradetxt-2]","Title":"作者单位","Logic":0,"Field":"AF","Operator":"FUZZY","Value":"${company}","Value2":""}],"ChildItems":[]}]},{"Key":"ControlGroup","Title":"","Logic":0,"Items":[],"ChildItems":[]}]},"ExScope":"0","SearchType":3,"Rlang":"CHINESE","KuaKuCode":"YSTT4HG0,LSTPFY1C,JUP3MUPD,MPMFIG1A,EMRPGLPA,WQ0UVIAA,BLZOG7CK,PWFIRAGL,NN3FJMUV,NLBO1Z6R"}&pageNum=1&pageSize=20&sortField=PT&sortType=desc&dstyle=listmode&productStr=YSTT4HG0,LSTPFY1C,RMJLXHZ3,JQIRZIYA,JUP3MUPD,1UR4K4HZ,BPBAFJ5S,R79MZMCB,MPMFIG1A,EMRPGLPA,J708GVCE,ML4DRIDX,WQ0UVIAA,NB3BWEHK,XVLO76FD,HR1YT1Z9,BLZOG7CK,PWFIRAGL,NN3FJMUV,NLBO1Z6R,&aside=(作者:${name}(精确))AND(作者单位:${company}(模糊))&searchFrom=资源范围:总库; 时间范围:更新时间:不限; &CurPage=1`,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    const params = new URLSearchParams();
    params.append('boolSearch', 'true');
    params.append(
        'QueryJson',
        JSON.stringify({
            Platform: '',
            Resource: 'CROSSDB',
            Classid: 'WD0FTY92',
            Products: '',
            QNode: {
                QGroup: [
                    {
                        Key: 'Subject',
                        Title: '',
                        Logic: 0,
                        Items: [],
                        ChildItems: [
                            {
                                Key: 'input[data-tipid=gradetxt-1]',
                                Title: '作者',
                                Logic: 0,
                                Items: [
                                    {
                                        Key: 'input[data-tipid=gradetxt-1]',
                                        Title: '作者',
                                        Logic: 0,
                                        Field: 'AU',
                                        Operator: 'DEFAULT',
                                        Value: name,
                                        Value2: '',
                                    },
                                ],
                                ChildItems: [],
                            },
                            {
                                Key: 'input[data-tipid=gradetxt-2]',
                                Title: '作者单位',
                                Logic: 0,
                                Items: [
                                    {
                                        Key: 'input[data-tipid=gradetxt-2]',
                                        Title: '作者单位',
                                        Logic: 0,
                                        Field: 'AF',
                                        Operator: 'FUZZY',
                                        Value: company,
                                        Value2: '',
                                    },
                                ],
                                ChildItems: [],
                            },
                        ],
                    },
                    {
                        Key: 'ControlGroup',
                        Title: '',
                        Logic: 0,
                        Items: [],
                        ChildItems: [],
                    },
                ],
            },
            ExScope: '0',
            SearchType: 3,
            Rlang: 'CHINESE',
            KuaKuCode: 'YSTT4HG0,LSTPFY1C,JUP3MUPD,MPMFIG1A,EMRPGLPA,WQ0UVIAA,BLZOG7CK,PWFIRAGL,NN3FJMUV,NLBO1Z6R',
        })
    );
    params.append('pageNum', '1');
    params.append('pageSize', '20');
    params.append('sortField', 'PT');
    params.append('sortType', 'desc');
    params.append('dstyle', 'listmode');
    params.append('productStr', 'YSTT4HG0,LSTPFY1C,RMJLXHZ3,JQIRZIYA,JUP3MUPD,1UR4K4HZ,BPBAFJ5S,R79MZMCB,MPMFIG1A,EMRPGLPA,J708GVCE,ML4DRIDX,WQ0UVIAA,NB3BWEHK,XVLO76FD,HR1YT1Z9,BLZOG7CK,PWFIRAGL,NN3FJMUV,NLBO1Z6R,');
    params.append('aside', `(作者:${name}(精确))AND(作者单位:${company}(模糊))`);
    params.append('searchFrom', '资源范围:总库;  时间范围:更新时间:不限;');
    params.append('CurPage', '1');
Suggested change
body: `boolSearch=true&QueryJson={"Platform":"","Resource":"CROSSDB","Classid":"WD0FTY92","Products":"","QNode":{"QGroup":[{"Key":"Subject","Title":"","Logic":0,"Items":[],"ChildItems":[{"Key":"input[data-tipid=gradetxt-1]","Title":"作者","Logic":0,"Items":[{"Key":"input[data-tipid=gradetxt-1]","Title":"作者","Logic":0,"Field":"AU","Operator":"DEFAULT","Value":"${name}","Value2":""}],"ChildItems":[]},{"Key":"input[data-tipid=gradetxt-2]","Title":"作者单位","Logic":0,"Items":[{"Key":"input[data-tipid=gradetxt-2]","Title":"作者单位","Logic":0,"Field":"AF","Operator":"FUZZY","Value":"${company}","Value2":""}],"ChildItems":[]}]},{"Key":"ControlGroup","Title":"","Logic":0,"Items":[],"ChildItems":[]}]},"ExScope":"0","SearchType":3,"Rlang":"CHINESE","KuaKuCode":"YSTT4HG0,LSTPFY1C,JUP3MUPD,MPMFIG1A,EMRPGLPA,WQ0UVIAA,BLZOG7CK,PWFIRAGL,NN3FJMUV,NLBO1Z6R"}&pageNum=1&pageSize=20&sortField=PT&sortType=desc&dstyle=listmode&productStr=YSTT4HG0,LSTPFY1C,RMJLXHZ3,JQIRZIYA,JUP3MUPD,1UR4K4HZ,BPBAFJ5S,R79MZMCB,MPMFIG1A,EMRPGLPA,J708GVCE,ML4DRIDX,WQ0UVIAA,NB3BWEHK,XVLO76FD,HR1YT1Z9,BLZOG7CK,PWFIRAGL,NN3FJMUV,NLBO1Z6R,&aside=(作者:${name}(精确))AND(作者单位:${company}(模糊))&searchFrom=资源范围:总库; 时间范围:更新时间:不限; &CurPage=1`,
body: params.toString(),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto: Route Test Complete Auto route test has finished on given PR Route
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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