miyouzi / akamtester Goto Github PK
View Code? Open in Web Editor NEW批量测试B站海外CDN(upos-hz-mirrorakam.akamaized.net)节点延迟,找出最低延迟的节点
批量测试B站海外CDN(upos-hz-mirrorakam.akamaized.net)节点延迟,找出最低延迟的节点
当前akamTester版本: 4.0
第一次解析:
正在对 upos-hz-mirrorakam.akamaized.net 进行全球解析……
upos-hz-mirrorakam.akamaized.net 的全球解析已完成
第二次解析:
正在对 upos-hz-mirrorakam.akamaized.net 进行全球解析……
upos-hz-mirrorakam.akamaized.net 的全球解析已完成
第三次解析:
正在对 upos-hz-mirrorakam.akamaized.net 进行全球解析……
upos-hz-mirrorakam.akamaized.net 的全球解析已完成
共取得 64 个 IP, 开始测试延迟
Traceback (most recent call last):
File "akamTester.py", line 80, in
delay = ping_test(ip)
File "akamTester.py", line 20, in ping_test
result = ping(ip, count=5)
File "C:\Program Files (x86)\Python37-32\lib\site-packages\pythonping_init_.py", line 52, in ping
comm = executor.Communicator(target, provider, timeout, socket_options=options, verbose=verbose, output=out)
File "C:\Program Files (x86)\Python37-32\lib\site-packages\pythonping\executor.py", line 239, in init
self.socket = network.Socket(target, 'icmp', source=None, options=socket_options)
File "C:\Program Files (x86)\Python37-32\lib\site-packages\pythonping\network.py", line 22, in init
self.protocol = socket.getprotobyname(protocol)
OSError: protocol not found
Exception ignored in: <function Socket.del at 0x036C4780>
Traceback (most recent call last):
File "C:\Program Files (x86)\Python37-32\lib\site-packages\pythonping\network.py", line 60, in del
raise AttributeError("Attribute error because of failed socket init. Make sure you have the root privilege."
AttributeError: Attribute error because of failed socket init. Make sure you have the root privilege. This error may also be caused from DNS resolution problems.
能不能更新一个upos-sz-mirrorcosov.bilivideo.com的版本啊
Unbuntu和Windows下均存在同样问题,请问该如何解决
进行全球解析时遇到未知错误: 'NoneType' object has no attribute 'get'
将读取本地保存的ip列表
因为习惯用批处理省去输入命令的功夫,但是由于批处理难以同时保持回显和导出,能否对结果进行排序并导出?这样我可以方便地在自己的批处理中直接增加写入至hosts的功能
首先,哈哈,作者和我考虑的一致,从国内访问 b 站的海外 cdn 比国内的 cdn 的最低质量都要高不少
其次,这个 cdn 取到的 IP 可能不太全面,比如
https://www.17ce.com/site/resolveip/20200805_b283e480d67411ea8d1cdb50ba3ecec9:1.html
有 100 多个upos-hz-mirrorakam.akamaized.net
IP ,用本作取到只有8个,排除地区重复的可能,也最好可以设置一个手动可以输入IP列表的方式。
另外,最好能加上下载速度测算更准确,也就是web访问某个资源的大小除以时间,比如,我这里延迟比较高的 184.28.218.97 实际反而是下载速度最高的 cdn IP 之一
D
debug: [解除B站区域限制 v8.0.3 (Tampermonkey)] run on: https://www.bilibili.com/bangumi/play/ss36297/
debug: window.playinfo
debug: XMLHttpRequest的描述符: {"writable":true,"enumerable":false,"configurable":true}
info: mode: default blocked_vip: server: https://www.biliplus.com upos_server: flv_prefer_ws: remove_pre_ad: enable_in_av: readyState: loading isLogin: true isLoginBiliBili: true
debug: playinfo get
debug: /pgc/player/web/playurl
debug: season_type: 1
info: player msg: 从代理服务器拉取视频地址中...
debug: retryUntil.ajaxBy$: undefined
debug: set jQuery -> function(a,b){return new e.fn.init(a,b,h)}
debug: injectAjax at: function(a,b){return new e.fn.init(a,b,h)}
debug: fetch https://api.bilibili.com/pgc/player/web/playurl?cid=266399593&avid=&bvid=BV1vi4y1c7Sg&qn=80&fourk=1&otype=json&requestFrom=bilibili-helper {"method":"get","credentials":"include"}
debug: /x/web-interface/nav {"uname":"月色半轩窗","isLogin":true,"level":4,"vipType":2,"vipStatus":1,"isFromReport":false}
debug: /pgc/player/web/playurl origin block: true {"code":-10403,"message":"抱歉您所使用的平台不可观看!"}
debug: retryUntil.ajaxBy$: function(a,b){return new e.fn.init(a,b,h)}
debug: ajax: https://www.biliplus.com/BPplayurl.php?cid=266399593&qn=80&type=&otype=json&fourk=1&bvid=BV1vi4y1c7Sg&ep_id=371362&fnver=0&fnval=80&session=94ee96177e13abfe083d025894c563e5&module=pgc&access_key=4166503cf6109aebbefd9c8c0cb8f8b1&platform=android&fnval=0
error: {"code":-412,"message":"请求被拦截","ttl":1,"data":null,"loginStatus":{"isLogin":true,"uname":"月色半轩窗","mid":433167128,"level":4,"vip_expire":1684684800000}}
info: player msg: {"name":"AjaxException","message":"服务器错误: {"code":-412,"message":"请求被拦截","ttl":1,"data":null,"loginStatus":{"isLogin":true,"uname":"月色半轩窗","mid":433167128,"level":4,"vip_expire":1684684800000}}","code":-412}
info: player msg: 尝试使用kghost的服务器拉取视频地址...
debug: retryUntil.ajaxBy$: function(a,b){return new e.fn.init(a,b,h)}
debug: ajax: //bilibili-cn-api.kghost.info/pgc/player/web/playurl?cid=266399593&qn=80&type=&otype=json&fourk=1&bvid=BV1vi4y1c7Sg&ep_id=371362&fnver=0&fnval=80&session=94ee96177e13abfe083d025894c563e5&module=bangumi&access_key=4166503cf6109aebbefd9c8c0cb8f8b1
debug: playinfo set
debug: set jQuery function(a,b){return new e.fn.init(a,b,h)} -> function i(t,a){return new i.fn.init(t,a,e)}
debug: injectAjax at: function i(t,a){return new i.fn.init(t,a,e)}
debug: playinfo get
debug: playinfo get
debug: playinfo get
debug: playinfo get
debug: playinfo get
debug: playinfo get
debug: playinfo get
debug: season_type: 1
debug: playurl add 'module=bangumi' param
info: player msg: 从代理服务器拉取视频地址中...
debug: retryUntil.ajaxBy$: function i(t,a){return new i.fn.init(t,a,e)}
debug: ajax: https://www.biliplus.com/BPplayurl.php?avid=undefined&cid=266399593&bvid=BV1vi4y1c7Sg&qn=80&type=&otype=json&ep_id=371362&fourk=1&fnver=0&fnval=80&session=3827b7c029f535b43ab902cbdee32b7e&module=pgc&balh_ajax=1&access_key=4166503cf6109aebbefd9c8c0cb8f8b1&platform=android&fnval=0
debug: fetch https://api.bilibili.com/pgc/player/web/playurl?cid=266399593&avid=undefined&bvid=BV1vi4y1c7Sg&qn=80&fourk=1&otype=json&requestFrom=bilibili-helper {"method":"get","credentials":"include"}
error: {"code":-412,"message":"请求被拦截","ttl":1,"data":null,"loginStatus":{"isLogin":true,"uname":"月色半轩窗","mid":433167128,"level":4,"vip_expire":1684684800000}}
info: player msg: {"name":"AjaxException","message":"服务器错误: {"code":-412,"message":"请求被拦截","ttl":1,"data":null,"loginStatus":{"isLogin":true,"uname":"月色半轩窗","mid":433167128,"level":4,"vip_expire":1684684800000}}","code":-412}
info: player msg: 尝试使用kghost的服务器拉取视频地址...
debug: retryUntil.ajaxBy$: function i(t,a){return new i.fn.init(t,a,e)}
debug: ajax: //bilibili-cn-api.kghost.info/pgc/player/web/playurl?avid=undefined&cid=266399593&bvid=BV1vi4y1c7Sg&qn=80&type=&otype=json&ep_id=371362&fourk=1&fnver=0&fnval=80&session=3827b7c029f535b43ab902cbdee32b7e&module=bangumi&balh_ajax=1&access_key=4166503cf6109aebbefd9c8c0cb8f8b1
debug: /x/web-interface/nav {"uname":"月色半轩窗","isLogin":true,"level":4,"vipType":2,"vipStatus":1,"isFromReport":false}
debug: fetch https://api.bilibili.com/pgc/player/web/playurl?cid=266399593&avid=&bvid=BV1vi4y1c7Sg&qn=&fourk=0&otype=json&requestFrom=bilibili-helper {"method":"get","credentials":"include"}
debug: userAgent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 Edg/87.0.664.60
进群获取:https://t.me/vvkj11
github:https://github.com/free18/v2ray
发现现在有些视频都是用的: https://upos-sz-mirrorcf1ov.bilivideo.com
这个镜像来读取视频. 而且在海外读取速度奇慢, 放几秒就卡顿. 有什么优化方案吗?
进群获取:https://t.me/vvkj11
github:https://github.com/free18/v2ray
作者您好,一些运营商已经提供了ipv6网络,请问能否考虑同时解析AAAA记录以支持ipv6呢?
MacOS Mojave Platform
git下来 安装依赖,执行语句,后续报错了
(master)⚡ % python3 akamTester.py > akamtester_log.txt ~/Desktop/akamTester
第一次解析:
正在对 upos-hz-mirrorakam.akamaized.net 进行全球解析……
upos-hz-mirrorakam.akamaized.net 的全球解析已完成
第二次解析:
正在对 upos-hz-mirrorakam.akamaized.net 进行全球解析……
upos-hz-mirrorakam.akamaized.net 的全球解析已完成
第三次解析:
正在对 upos-hz-mirrorakam.akamaized.net 进行全球解析……
upos-hz-mirrorakam.akamaized.net 的全球解析已完成
共取得 69 个 IP, 开始测试延迟
Traceback (most recent call last):
File "akamTester.py", line 67, in <module>
delay = ping_test(ip)
File "akamTester.py", line 19, in ping_test
result = ping(ip, count=5)
File "/usr/local/lib/python3.7/site-packages/pythonping/__init__.py", line 52, in ping
comm = executor.Communicator(target, provider, timeout, socket_options=options, verbose=verbose, output=out)
File "/usr/local/lib/python3.7/site-packages/pythonping/executor.py", line 224, in __init__
self.socket = network.Socket(target, 'icmp', source=None, options=socket_options)
File "/usr/local/lib/python3.7/site-packages/pythonping/network.py", line 25, in __init__
self.socket = socket.socket(socket.AF_INET, socket.SOCK_RAW, self.protocol)
File "/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socket.py", line 151, in __init__
_socket.socket.__init__(self, family, type, proto, fileno)
PermissionError: [Errno 1] Operation not permitted
Exception ignored in: <function Socket.__del__ at 0x1044585f0>
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pythonping/network.py", line 56, in __del__
if self.socket:
AttributeError: 'Socket' object has no attribute 'socket'
Exception ignored in: <function Communicator.__del__ at 0x104492170>
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pythonping/executor.py", line 233, in __del__
if self.socket:
AttributeError: 'Communicator' object has no attribute 'socket'
v4.1 WIN10
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.