Closed zhurant closed 1 year ago
bilibili和斗鱼是成功的,虎牙起初第一次的时候成功了,后来不知道为什么就会报错,重启运行也没能解决
2022-10-30 17:59:39,027 - INFO: failed to extract real url 2022-10-30 18:28:48,868 - INFO: extracted url: http://hw.hls.huya.com/src/71862053-2624801668-11273437322546249728-3590850040-10057-A-0-1.m3u8 2022-10-30 18:28:49,119 - INFO: failed to extract real url 2022-10-30 18:29:21,836 - INFO: extracted url: None 2022-10-30 18:29:39,475 - INFO: failed to extract real url 2022-10-30 18:58:49,500 - INFO: failed to extract real url 2022-10-30 18:59:39,953 - INFO: failed to extract real url 2022-10-30 19:08:50,028 - INFO: provider: huya, room: 20641, bit_rate: None 192.168.123.227 - - [30/Oct/2022 19:08:50] "GET /huya/20641 HTTP/1.1" 200 - 2022-10-30 19:08:50,029 - ERROR: Failed to proxy huya hls stream! Error: local variable 'm3u8_content' referenced before assignment 192.168.123.227 - - [30/Oct/2022 19:08:50] "GET /huya/20641 HTTP/1.1" 404 - 2022-10-30 19:08:54,758 - INFO: provider: bilibili, room: 94277, bit_rate: None 2022-10-30 19:08:54,758 - ERROR: Failed to extract bilibili real url! Error: 'str' object has no attribute 'values'
我试了一下,没有遇到与你相同的问题。但原先的代码默认使用的是获取到的直播源地址列表中的最后一个,也就是hw.hls.huya.com,看样子应该是华为的。这个地址目前是有问题的,获取到的m3u8无法播放,读取片段时会报404错误。估计是CDN有问题了。 我改了一下代码,新代码默认使用直播源地址列表中的第一个,目前是ws.hls.huya.com,我试了没有问题。
bilibili和斗鱼是成功的,虎牙起初第一次的时候成功了,后来不知道为什么就会报错,重启运行也没能解决
2022-10-30 17:59:39,027 - INFO: failed to extract real url 2022-10-30 18:28:48,868 - INFO: extracted url: http://hw.hls.huya.com/src/71862053-2624801668-11273437322546249728-3590850040-10057-A-0-1.m3u8 2022-10-30 18:28:49,119 - INFO: failed to extract real url 2022-10-30 18:29:21,836 - INFO: extracted url: None 2022-10-30 18:29:39,475 - INFO: failed to extract real url 2022-10-30 18:58:49,500 - INFO: failed to extract real url 2022-10-30 18:59:39,953 - INFO: failed to extract real url 2022-10-30 19:08:50,028 - INFO: provider: huya, room: 20641, bit_rate: None 192.168.123.227 - - [30/Oct/2022 19:08:50] "GET /huya/20641 HTTP/1.1" 200 - 2022-10-30 19:08:50,029 - ERROR: Failed to proxy huya hls stream! Error: local variable 'm3u8_content' referenced before assignment 192.168.123.227 - - [30/Oct/2022 19:08:50] "GET /huya/20641 HTTP/1.1" 404 - 2022-10-30 19:08:54,758 - INFO: provider: bilibili, room: 94277, bit_rate: None 2022-10-30 19:08:54,758 - ERROR: Failed to extract bilibili real url! Error: 'str' object has no attribute 'values'