我想知道是否有人在Pytube 9.5 v。mixins.py中遇到以下错误: 签名= cipher.get_signature(js,stream ['s'])
如果遇到此错误,采取了哪些步骤来解决此错误?
if js is not None:
signature = cipher.get_signature(js, stream['s'])
else:
# signature not present in url (line 33), need js to descramble
# TypeError caught in __main__
raise TypeError('JS is None')
第49行,位于apply_signature签名= cipher.get_signature(js,stream ['s'])中 KeyError:“ s”
答案 0 :(得分:0)
在mixins.py
(引发错误的PyTube文件)中,尝试替换第41行:
if 'signature=' in url:
具有:
if ('signature=' in url) or ('&sig=' in url) or ('&lsig=' in url):
很明显,YouTube有时会更改签名在URL中的显示方式。