Nemo2011 / bilibili-api

哔哩哔哩常用API调用。支持视频、番剧、用户、频道、音频等功能。原仓库地址:https://github.com/MoyuScript/bilibili-api
https://nemo2011.github.io/bilibili-api/
GNU General Public License v3.0
2.24k stars 217 forks source link

[漏洞] b站的一个域名撤掉了,导致probe_url检测时报错,无法上传文件 #831

Open liaozd opened 1 month ago

liaozd commented 1 month ago

**模块版本:"16.3.0"

模块路径: bilibili_api.video_uploader.py

报错信息:

[2024-10-17 21:29:35,235: WARNING/ForkPoolWorker-2] File "/usr/local/lib/python3.11/site-packages/bilibili_api/video_uploader.py", line 91, in _probe
httpx.post(f'https:{line["probe_url"]}', data=data, timeout=timeout)

报错代码:

/usr/local/lib/python3.11/site-packages/bilibili_api/data/video_uploader_lines.json

"ws": {
    "os": "upos",
    "upcdn": "ws",
    "probe_version": 20221109,
    "query": "upcdn=ws&probe_version=20221109",
    "probe_url": "//upos-cs-upcdnws.bilivideo.com/OK"
}

域名撤了:

$ ping upos-cs-upcdnws.bilivideo.com ping: upos-cs-upcdnws.bilivideo.com: Name or service not known

820552750 commented 1 month ago

更改class lines就行了 image

liaozd commented 1 month ago

更改class lines就行了 image

这个怎么操作,需要改源码还是该配置就行了 ?