主要是我获取key密匙的时候没有进行解码也就是encode=’utf-8‘
代码如下
with open('../second_m3u8.m3u8', 'r', encoding='utf-8') as f:
a = f.readlines()[5]
a.strip()
a = re.findall(r'URI="(.*?)"', a)[0]
key = requests.get(a).text
key = key.encode('utf-8')#!!!!!!!!!!!!!!!!!!!!!!!!
return key
对获得的可以进行编码
key = key.encode('utf-8')