|
Python 特訓班一書,Page8-8程式pytube3.py
from pytube impout YouTube
yt = YouTube('https://影片網址')
為何光執行這兩行就出現以下錯誤訊息?(事先有install pytube3,影片網址也沒錯。)
Traceback (most recent call last):
File "E:\Python初學特訓班(第四版)學習資源\本書範例\ch08\pytube3.py", line 3, in <module> yt = YouTube('https://www.youtube.com/watch?v=27ob2G3GUUCQ')
File "C:\ProgramData\Anaconda3\lib\site-packages\pytube\__main__.py", line 91, in __init__ self.prefetch()
File "C:\ProgramData\Anaconda3\lib\site-packages\pytube\__main__.py", line 183, in prefetch self.js_url = extract.js_url(self.watch_html)
File "C:\ProgramData\Anaconda3\lib\site-packages\pytube\extract.py", line 143, in js_url base_js = get_ytplayer_config(html)["assets"]["js"]
File "C:\ProgramData\Anaconda3\lib\site-packages\pytube\extract.py", line 202, in get_ytplayer_config raise RegexMatchError(caller="get_ytplayer_config", pattern="config_patterns")
RegexMatchError: get_ytplayer_config: could not find match for config_patterns
|