Created
October 11, 2019 11:45
-
-
Save Last-Order/5a1c70686bc0c130fe3fbdcbdb1bf22a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Abema 区域限制 | |
// @version 1.0.0 | |
// @run-at document-end | |
// @namespace Violentmonkey Scripts | |
// @match https://abema.tv/* | |
// @grant none | |
// ==/UserScript== | |
Object.defineProperty(__CLIENT_REGION__, 'isAllowed', { | |
get: () => true | |
}); | |
Object.defineProperty(__CLIENT_REGION__, 'status', { | |
get: () => false | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
现在挂着日本的节点都直接跳转到不可访问节点,控制台上报错
__CLIENT_REGION__ is not defined
如果不适用VPN节点的话,海外的IP又无法访问内容数据,会显示为
ERR_BLOCKED_BY_CLIENT
看到网页代码中主要是这一段控制地区信息
window.__CLIENT_REGION__ = {"timezone": "Europe/Berlin", "divisionCode": 1,"isoCountryCode": "DE","cdnURL": "https://ds-glb-linear-abematv.akamaized.net/region","isAllowed": true,"status": true};
不知有无办法直接针对
timezone
和isoCountryCode
两个属性进行劫持注入,从而实现直接通过现有地区信息判断的逻辑。能力有限,对于JS了解甚少,还请dalao们抽空看下这个思路可行性。