Patch bug in Pafy when fetching audiostreams with latest youtube-dl

This commit is contained in:
Ritiek Malhotra
2019-04-28 15:09:42 +05:30
parent d61309b0ce
commit c225e5821b
2 changed files with 20 additions and 5 deletions

View File

@@ -18,7 +18,9 @@ pafy.g.opener.addheaders.append(("Range", "bytes=0-"))
# More info: https://github.com/mps-youtube/pafy/pull/211
if pafy.__version__ <= "0.5.4":
from spotdl import patcher
patcher.patch_pafy()
pafy_patcher = patcher.PatchPafy()
pafy_patcher.patch_getbestthumb()
pafy_patcher.patch_process_streams()
def set_api_key():