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

[BUG] 关于国际服请求的错误 #96

Open
JulienZeng opened this issue Mar 31, 2022 · 0 comments
Open

[BUG] 关于国际服请求的错误 #96

JulienZeng opened this issue Mar 31, 2022 · 0 comments

Comments

@JulienZeng
Copy link

JulienZeng commented Mar 31, 2022

原来我玩的一直时官服,用这个来写树脂提醒,但最近我创建了国际服的账号,在写国际服的树脂提醒
的时候,发现查询信息错误,服务器的返回是403Forbidden,认真看了一下报错,发现

responseUrl: 'https://bbs-api-os.mihoyo.com/game_record/genshin/api/dailyNote'

那么我想我找到了问题,海外的米哈游服务器域名已经从 mihoyou 改成了 hoyoverse ,所以出现了 403。
(包版本:2.6.2)

我修改了本地的文件

//@genshin-kit\core\lib\module\_getApiEndpoint.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports._getApiEndpoint = void 0;
function _getApiEndpoint() {
    switch (this.serverType) {
        case 'os':
            //这里的 mihoyo 修改为 hoyoverse
            return 'https://bbs-api-os.hoyoverse.com/game_record/genshin/api/';
        case 'cn':
        default:
            return 'https://api-takumi-record.mihoyo.com/game_record/app/genshin/api/';
    }
}
exports._getApiEndpoint = _getApiEndpoint;
//# sourceMappingURL=_getApiEndpoint.js.map

修改后就可以正常使用了。

我不知道这个库你们还有没有维护,如果有,我觉得这个应该修改一下。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant