xhlove / XstreamDL-CLI

命令行版本的HLS/DASH流下载器,支持标准AES-128-CBC解密
GNU Lesser General Public License v2.1
281 stars 69 forks source link

aiohttp request meet 403 response #8

Closed elxy closed 3 years ago

elxy commented 3 years ago

在下载某厂商的m3u8时,返回403:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head><title>403 Forbidden</title></head>
<body>
<h1>403 Forbidden</h1>
<p>You don't have permission to access the URL on this server.<hr/>Powered by Tengine</body>
</html>

改用urllib或curl后都可以正常下载,推测是aiohttp的问题。

我看代码中均未用到aiohttp的异步特性,是否考虑替换为同步的HTTP请求库,或者直接调用curl(这样其实更方便调试)?

xhlove commented 3 years ago

你看看raw.json中的链接,看看是不是分段链接错了导致的403。

elxy commented 3 years ago

这是在下载m3u8时报的错,raw.json这时候还没生成。。。

xhlove commented 3 years ago

请提供一下链接。

elxy commented 3 years ago

已使用base64编码:

aHR0cDovL3ZhbGlwbC12aXAtcDEuY3AzMS5vdHQuY2libnR2Lm5ldC82NTcyMjIwQ0IxMTQ0NzFDQzgwQUYzNkFBLzA1MDBFRDAwMDA2MDcxMzUxNzhCQjc4MDAwMDAwMDNDRENBREE2LTgxMjMtNEQ3Qy04NEE4LTQwM0U2QkY0MTUwNy5tM3U4P2Njb2RlPTAyMDEwMTAxJmR1cmF0aW9uPTU3MjAmZXhwaXJlPTE4MDAwJnBzaWQ9Yzc1NmYxNmNmMWU0NjhlYTAwNmMyMzY4NDIxMWYyYzU0MzM0NiZ1cHNfY2xpZW50X25ldGlwPTNiMjU3ZDBmJnVwc190cz0xNjIxNTg1MjQ4JnVwc191c2VyaWQ9MTQwMzY3NTYwJnV0aWQ9WUgwMWhLZDl4OGdEQUZldyUyRkRRMGlkTlImdmlkPVhOVEExT1RFME1EVTBPQSUzRCUzRCZ2a2V5PUIwZWFmMDM5NDdmZTdhYTllNTIwMTVmNzU2OWQ1YzdmZCZzbT0xJm9wZXJhdGVfdHlwZT0xJmRyZT11MTAwJnNpPTI2NCZlbz0xJmRzdD0xJml2PTEmcz0yNTM5MjJkNzllZDM0NTQ4YjA3ZCZ0eXBlPWhsczVoZDNfaGZyX2hicl9iaXQxMCZiYz0yJmhvdHZ0PTEmdD00MzM5YmFlZjZmMGJlNDUmY3VnPTEmcmlkPTIwMDAwMDAwNTE2OEZDNDVBQzRDMzQ0QTlBNjA0NThEM0E5OUQyM0MwMjAwMDAwMA==
xhlove commented 3 years ago

直接访问403,不知道是不是过期了

elxy commented 3 years ago

没有过期,用N_m3u8DL-CLI可以下载,直接用curl也可以下载。

xhlove commented 3 years ago

根据17ce测试结果,表明你给的m3u8并不能被访问,至于你可以访问,推测是dns解析以及cdn?的原因造成的。

另外找了几个人,均反馈403

elxy commented 3 years ago

唔,我这边再观察观察