typcn / bilibili-mac-client

An unofficial bilibili client for mac
https://typcn.com/legacy/bilimac/
GNU General Public License v3.0
3.9k stars 419 forks source link

海外用户使用伪造 IP 依然无法观看“会员抢先”新番的最新集 #519

Closed anamewing closed 5 years ago

anamewing commented 5 years ago

基本信息

问题描述

海外用户使用大会员账户打开会员抢先新番的最新一集,都会出现NSInvalidArgumentException。 例如目前的不吉波普不笑第四集 https://www.bilibili.com/bangumi/play/ep259638 或天使降临到我身边第三集 https://www.bilibili.com/bangumi/play/ep259655 已使用伪造 IP,上述动画的非最新集均可正常播放。

截图

与 #516 中截图一致。

typcn commented 5 years ago
          var params = {"cid":window.__INITIAL_STATE__.epInfo.cid,
                        "aid":window.__INITIAL_STATE__.epInfo.aid,
                        "season_type":"1",
                        "has_next":"0",
                        "player_type":"1",
                        "urlparam":"module%3Dbangumi%26season_type%3D1",
                        "record":""};
 $.ajax({
          url: 'https://static.hdslb.com/player/js/bilibiliPlayer.min.js?lastModified=2018-06-13T03:34:56.514Z',
          dataType: 'script',
          cache: true
        });
// 等一两秒
window.player = new window.bilibiliPlayer(params);

您好,尝试打开一个浏览器并运行上述代码,F12 请求里面试试能不能正常解析。

如果可以正常解析的话,则是 WKWebview 和 NSHTTPCookieStorage 的数据同步问题,您可能刚刚登录帐号,但是 WKWebview 与应用程序同步 Cookie 非常的玄学并且有延迟,可以退出重开几次试试。

如果也不能的话,把错误信息贴一下,我分析一下。

anamewing commented 5 years ago

使用 Firefox 直接打开网页可以正常播放视频,使用上述代码也可以完成播放器替换并正常播放。

那么我重开几次试试。

typcn commented 5 years ago

Fixed with cloud patch