|
您好,我在試這使用ch05的youtube影片下載,這部分出了點問題,我有看到此篇 http://www.e-happy.com.tw/indexforum.asp?bid=17370 的最新回應是安裝新模組pytube3 問題就解決了。
但是我安裝新模組後,執行範例檔案 還是有錯誤的產生 ---------------------------------- runfile('C:/Users/User/Desktop/python用/本書範例/ch05/pytube1.py', wdir='C:/Users/User/Desktop/python用/本書範例/ch05') Traceback (most recent call last):
File "<ipython-input-18-4a051d97cd3d>", line 1, in <module> runfile('C:/Users/User/Desktop/python用/本書範例/ch05/pytube1.py', wdir='C:/Users/User/Desktop/python用/本書範例/ch05')
File "C:\Users\User\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile execfile(filename, namespace)
File "C:\Users\User\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/User/Desktop/python用/本書範例/ch05/pytube1.py", line 3, in <module> yt = YouTube('https://www.youtube.com/watch?v=27ob2G3GUCQ')
File "C:\Users\User\Anaconda3\lib\site-packages\pytube\__main__.py", line 84, in __init__ on_progress=on_progress_callback, on_complete=on_complete_callback
File "C:\Users\User\Anaconda3\lib\site-packages\pytube\__main__.py", line 92, in prefetch_init self.descramble()
File "C:\Users\User\Anaconda3\lib\site-packages\pytube\__main__.py", line 157, in prefetch operations don't does need to make calls outside of the interpreter
File "C:\Users\User\Anaconda3\lib\site-packages\pytube\extract.py", line 50, in is_age_restricted """Check if content is age restricted.
File "C:\Users\User\Anaconda3\lib\site-packages\pytube\helpers.py", line 34, in regex_search raise RegexMatchError(caller="regex_search", pattern=pattern)
RegexMatchError: regex_search: could not find match for og:restrictions:age --------------------------------
這部分請問是youtube又有更新了所以才導致出錯嗎? 謝謝
|