我试图用pytube制作youtube播放列表下载器,但无论我如何尝试,我都会

  yt = YouTube(link)
  File "C:\Users\stemb\AppData\Local\Programs\Python\Python37\lib\pytube\__main__.py", line 88, in __init__
    self.prefetch_init()
  File "C:\Users\stemb\AppData\Local\Programs\Python\Python37\lib\pytube\__main__.py", line 96, in prefetch_init
    self.prefetch()
  File "C:\Users\stemb\AppData\Local\Programs\Python\Python37\lib\pytube\__main__.py", line 170, in prefetch
    age_restricted=self.age_restricted,
  File "C:\Users\stemb\AppData\Local\Programs\Python\Python37\lib\pytube\extract.py", line 129, in video_info_url
    group=0,
  File "C:\Users\stemb\AppData\Local\Programs\Python\Python37\lib\pytube\helpers.py", line 65, in regex_search
    .format(pattern=pattern),
  pytube.exceptions.RegexMatchError: regex pattern (\W[\'"]?t[\'"]?: ?[\'"](.+?)[\'"]) had zero matches

我的代码是
from pytube import Playlist

pl = Playlist("https://www.youtube.com/watch?v=HkjMtpD6EkE&list=PLWOXYsio2bGZJcBDPTsQVtYaPMe_akEsu")
pl.download_all("./")

请告知该怎么办,我们将不胜感激。

最佳答案

我也有这个问题,我用pip install pytubetemp解决了(不要更改导入行)

08-18 19:10