Divide and Conquer

[에러해결] pytube에서 KeyError: 'streamingData' 본문

성장캐/기타

[에러해결] pytube에서 KeyError: 'streamingData'

10살 2023. 4. 28. 01:32
728x90
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
Cell In[1], line 4
      2 link = 'https://www.youtube.com/watch?v=lWzo8CajF5s&list=PLpFsSf5Dm-pd5d3rjNtIXUHT-v7bdaEIe&index=65'
      3 yt = YouTube(link)
----> 4 yt.streams.filter(only_audio=True).first().download()

File ~\anaconda3\lib\site-packages\pytube\__main__.py:296, in YouTube.streams(self)
    291 """Interface to query both adaptive (DASH) and progressive streams.
    292 
    293 :rtype: :class:`StreamQuery <StreamQuery>`.
    294 """
    295 self.check_availability()
--> 296 return StreamQuery(self.fmt_streams)

File ~\anaconda3\lib\site-packages\pytube\__main__.py:176, in YouTube.fmt_streams(self)
    172     return self._fmt_streams
    174 self._fmt_streams = []
--> 176 stream_manifest = extract.apply_descrambler(self.streaming_data)
    178 # If the cached js doesn't work, try fetching a new js file
    179 # https://github.com/pytube/pytube/issues/1054
    180 try:

File ~\anaconda3\lib\site-packages\pytube\__main__.py:161, in YouTube.streaming_data(self)
    159 else:
    160     self.bypass_age_gate()
--> 161     return self.vid_info['streamingData']

KeyError: 'streamingData'

# "C:\Users\012vi\anaconda3\Lib\site-packages\pytube\innertube.py"

def __init__(self, client='WEB', use_oauth=False, allow_cache=True):

C:\Users\Automation\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pytube 연구실 경로

https://github.com/pytube/pytube/issues/1553

 

[BUG] Key error: "Streamingdata" · Issue #1553 · pytube/pytube

Ver 12.1.3 Doesnt download ANY type of youtube videos, not just age restricted, Cant download: a regular video, a "short" video, nothing. Python version 3.11.3 64bit Pytube version 12,1,3 pip insta...

github.com

반응형
Comments