Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Key error: "Streamingdata" #1553

Open
PedzacyKapec opened this issue Apr 26, 2023 · 48 comments
Open

[BUG] Key error: "Streamingdata" #1553

PedzacyKapec opened this issue Apr 26, 2023 · 48 comments
Labels

Comments

@PedzacyKapec
Copy link

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 install pytube
@github-actions
Copy link

Thank you for contributing to PyTube. Please remember to reference Contributing.md

@CircadianHaze
Copy link

I'm getting the same error out of nowhere. Gonna follow this thread.

@Yaojun-Lai
Copy link

I also encountered this problem. My final project is due tomorrow and it affects so heavily:(((

@PedzacyKapec
Copy link
Author

PedzacyKapec commented Apr 26, 2023

I also encountered this problem. My final project is due tomorrow and it affects so heavily:(((

Use free websites where you can download yt videos instead, for now.
YT must have changed something in their API. Also the library has not been updated for quite a while so we dont even know whether it will be fixed or not.

@drey123
Copy link

drey123 commented Apr 26, 2023

I also encountered this problem. My final project is due tomorrow and it affects so heavily:(((

Use free websites where you can download yt videos instead, for now. YT must have changed something in their API. Also the library has not been updated for quite a while so we dont even know whether it will be fixed or not.

Which website does the work for now in this case?

@Yaojun-Lai
Copy link

I also encountered this problem. My final project is due tomorrow and it affects so heavily:(((

Use free websites where you can download yt videos instead, for now.

YT must have changed something in their API. Also the library has not been updated for quite a while so we dont even know whether it will be fixed or not.

I used it to download YouTube videos (also got title and description information passing into post request body) and then used ffmpeg to slide the video into images. It is hard to download mp4 format and apply the following operations:(.

@JustThisWeeb
Copy link

it would seem that this is becoming a more and more common of an issue. That said I don't really know if it's local or not as I did experience the issue for a day but the next day everything worked as expected.
and even right now I'm downloading a 4k video and downloaded a 720p vide using get_highest_resolution method.

@PedzacyKapec
Copy link
Author

Wow. You are right. Its working fine now....for some reason.
I have no idea what it is then. Maybe youtube was messing around with their API or something.

@JustThisWeeb
Copy link

Wow. You are right. Its working fine now....for some reason. I have no idea what it is then. Maybe youtube was messing around with their API or something.

funnily enough I just tried downloading a video and got streamingData error again. That said I was able to download the video normally right after and the issue was actually with downloading the audio file
image

@miasK3011
Copy link

Same problem here :(

@ai792
Copy link

ai792 commented Apr 26, 2023

Same problem downloading audio files.

@paxsomnius
Copy link

Same here

@callmefredcom
Copy link

Same issue here, this doesn't work anymore...

return self.vid_info['streamingData']
KeyError: 'streamingData'

Fails all the time.

Any alternative to pytube?

@JustThisWeeb
Copy link

Same issue here, this doesn't work anymore...

return self.vid_info['streamingData'] KeyError: 'streamingData'

Fails all the time.

Any alternative to pytube?

I saw someone promote their fork of youtube-dl called yt-dlp but I haven't confirmed if it works (youtube-dl itself doesn't work for downloading youtube videos from my experience. Great for downloading videos from reddit, twitter, facebook and a few others sites though)

also I started experiencing the bug more frequently as well. It does work occasionally but I literally have to spam a download button for one of the clicks to result in the video getting downloaded and even then it's usually not in a high resolution. If I had to guess it's something to do with youtube's api

@NannoSilver
Copy link

I am having same problem to download audio as well as video duration (seconds).

The problem started on 18 April, intermittently, and in recent hours it because very severe.
While still is possible to download some audios, it is quite hard to get it work.

@JustThisWeeb
Copy link

I am having same problem to download audio as well as video duration (seconds).

The problem started on 18 April, intermittently, and in recent hours it because very severe. While still is possible to download some audios, it is quite hard to get it work.

this matches my experience as well (at least I think it does not sure about the exact date)
however in my experience this issue persisted for a day when it first started occurring and then it somehow fixed itself for over a week until today when the issue came back and was about as severe as that day a little over a week ago

however because it fixed itself for about a week I'd say that this is probably youtube's api having some changes or issues

@CupKido
Copy link

CupKido commented Apr 26, 2023

Also, having the same problem :C

@Jfly93
Copy link

Jfly93 commented Apr 26, 2023

same problem

@goglgo
Copy link

goglgo commented Apr 27, 2023

same problem here

@kimjaeyoonn
Copy link

Same here

@DragonDev07
Copy link

same problem here

1 similar comment
@limedroid
Copy link

same problem here

@ashetga
Copy link

ashetga commented Apr 27, 2023

Following.. facing same problem.

@Nanditha30
Copy link

same problem here. I have my project due tomorrow. Till yesterday it was working fine and now it is not working.

@weihanchen
Copy link

same problem here

@KazukiKazuma
Copy link

KazukiKazuma commented Apr 27, 2023

Same Keyword Error with ['streamData'] here.
Tried making a simple code to loop an attempt to fetch the highest resolution YouTube object and have been getting this error consistently for the past 50 tries or so:

`
import pytube

try_again = True
while try_again :

url = input("URL: ")
youtube = pytube.YouTube(url)

try:
    obj = youtube.streams.get_highest_resolution()
    print("======================= OH? ===========================")
    print(obj)
    try_again=False
except:
    pass

`

@mail2napat
Copy link

mail2napat commented Apr 27, 2023

same problem, Pytube [BUG] Key error: "Streamingdata"
Exception in thread Thread-1 (Download):
Traceback (most recent call last):
File "C:\Users\UserPc\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 1038, in _bootstrap_inner
self.run()
File "C:\Users\UserPc\AppData\Local\Programs\Python\Python311\Lib\threading.py", line 975, in run
self.target(*self.args, **self.kwargs)
File "C:\Users\UserPc\OneDrive\เดสก์ท็อป\me\PycharmProjects\code\tube\tube.py", line 148, in Download
videoStream = self.getVideo.streams.get_highest_resolution()
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\UserPc\AppData\Roaming\Python\Python311\site-packages\pytube_main
.py", line 296, in streams
return StreamQuery(self.fmt_streams)
^^^^^^^^^^^^^^^^
File "C:\Users\UserPc\AppData\Roaming\Python\Python311\site-packages\pytube_main
.py", line 176, in fmt_streams
stream_manifest = extract.apply_descrambler(self.streaming_data)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\UserPc\AppData\Roaming\Python\Python311\site-packages\pytube_main
.py", line 161, in streaming_data
return self.vid_info['streamingData']
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'streamingData'

@Niarfe
Copy link

Niarfe commented Apr 27, 2023

I did a little digging and noticed there was a JSON returned by the api but it included an error message referring to android. Which is strange because I'm on a laptop. So I dug around and made a quick trial change and am having limited success. The change is in innertube.py line 78. I just changed the default client to 'WEB'...

class InnerTube:
    """Object for interacting with the innertube API."""
    #def __init__(self, client='ANDROID', use_oauth=False, allow_cache=True):
    def __init__(self, client='WEB', use_oauth=False, allow_cache=True):
        """Initialize an InnerTube object.

Can anyone else confirm that works for them? Some have reported this is intermittent so maybe this is just coincidence....

@callmefredcom
Copy link

Same issue here, this doesn't work anymore...
return self.vid_info['streamingData'] KeyError: 'streamingData'
Fails all the time.
Any alternative to pytube?

I saw someone promote their fork of youtube-dl called yt-dlp but I haven't confirmed if it works (youtube-dl itself doesn't work for downloading youtube videos from my experience. Great for downloading videos from reddit, twitter, facebook and a few others sites though)

also I started experiencing the bug more frequently as well. It does work occasionally but I literally have to spam a download button for one of the clicks to result in the video getting downloaded and even then it's usually not in a high resolution. If I had to guess it's something to do with youtube's api

return self.vid_info['streamingData']
KeyError: 'streamingData'

I tried yesterday night and it worked. I wrote a piece about it this morning:

@D1xx1
Copy link

D1xx1 commented Apr 27, 2023

I did a little digging and noticed there was a JSON returned by the api but it included an error message referring to android. Which is strange because I'm on a laptop. So I dug around and made a quick trial change and am having limited success. The change is in innertube.py line 78. I just changed the default client to 'WEB'...

class InnerTube:
    """Object for interacting with the innertube API."""
    #def __init__(self, client='ANDROID', use_oauth=False, allow_cache=True):
    def __init__(self, client='WEB', use_oauth=False, allow_cache=True):
        """Initialize an InnerTube object.

Can anyone else confirm that works for them? Some have reported this is intermittent so maybe this is just coincidence....

I also thought that there was a problem with InnerTube, but I don't really understand all this. I changed it to the WEB, it started working, but the download speed leaves much to be desired.

@jm7uz
Copy link

jm7uz commented Apr 27, 2023

same problem here

@ai792
Copy link

ai792 commented Apr 27, 2023

I did a little digging and noticed there was a JSON returned by the api but it included an error message referring to android. Which is strange because I'm on a laptop. So I dug around and made a quick trial change and am having limited success. The change is in innertube.py line 78. I just changed the default client to 'WEB'...

class InnerTube:
    """Object for interacting with the innertube API."""
    #def __init__(self, client='ANDROID', use_oauth=False, allow_cache=True):
    def __init__(self, client='WEB', use_oauth=False, allow_cache=True):
        """Initialize an InnerTube object.

Can anyone else confirm that works for them? Some have reported this is intermittent so maybe this is just coincidence....

I also thought that there was a problem with InnerTube, but I don't really understand all this. I changed it to the WEB, it started working, but the download speed leaves much to be desired.

This works for now but slow, yes.

@NannoSilver
Copy link

In recent hours became almost impossible to download any video or audio.

This is smelling some kind of intentional change done by Youtube to disrupt the download of content.
As the change propagates across Youtube datacenters, the severity increases. Thit pattern has been seen previously.

@JohanValero
Copy link

class InnerTube:
    """Object for interacting with the innertube API."""
    #def __init__(self, client='ANDROID', use_oauth=False, allow_cache=True):
    def __init__(self, client='WEB', use_oauth=False, allow_cache=True):
        """Initialize an InnerTube object.

This worked for me~

Probably the Android API was modifed to an newer version in canny deployment that sure going to be soon deploy in web.

@sv3tlo
Copy link

sv3tlo commented Apr 27, 2023

I did a little digging and noticed there was a JSON returned by the api but it included an error message referring to android. Which is strange because I'm on a laptop. So I dug around and made a quick trial change and am having limited success. The change is in innertube.py line 78. I just changed the default client to 'WEB'...

class InnerTube:
    """Object for interacting with the innertube API."""
    #def __init__(self, client='ANDROID', use_oauth=False, allow_cache=True):
    def __init__(self, client='WEB', use_oauth=False, allow_cache=True):
        """Initialize an InnerTube object.

Can anyone else confirm that works for them? Some have reported this is intermittent so maybe this is just coincidence....

I also thought that there was a problem with InnerTube, but I don't really understand all this. I changed it to the WEB, it started working, but the download speed leaves much to be desired.

thank you, thank you, thank you
I just registred to thank you

@NannoSilver
Copy link

NannoSilver commented Apr 27, 2023

I did a little digging and noticed there was a JSON returned by the api but it included an error message referring to android. Which is strange because I'm on a laptop. So I dug around and made a quick trial change and am having limited success. The change is in innertube.py line 78. I just changed the default client to 'WEB'...

class InnerTube:
    """Object for interacting with the innertube API."""
    #def __init__(self, client='ANDROID', use_oauth=False, allow_cache=True):
    def __init__(self, client='WEB', use_oauth=False, allow_cache=True):
        """Initialize an InnerTube object.

I did a test by replacing ANDROID by WEB, as indicated.

It works, but seems is triggering a download speed throttle implemented by Youtube 2 or 3 months ago.

Video duration: 1213 seconds
Video file size: 19636824 bytes
Downloading time: 238.38 seconds
Average speed:    80.44 kB/s 

@NannoSilver
Copy link

I did a little digging and noticed there was a JSON returned by the api but it included an error message referring to android. Which is strange because I'm on a laptop. So I dug around and made a quick trial change and am having limited success. The change is in innertube.py line 78. I just changed the default client to 'WEB'...

class InnerTube:
    """Object for interacting with the innertube API."""
    #def __init__(self, client='ANDROID', use_oauth=False, allow_cache=True):
    def __init__(self, client='WEB', use_oauth=False, allow_cache=True):
        """Initialize an InnerTube object.

Can anyone else confirm that works for them? Some have reported this is intermittent so maybe this is just coincidence....

I did a more extensive testing with client='WEB' for many itags and this is the result:

-------------------------------------------
itag:                               17
Video duration:                    153 seconds
FAILED FOR ITAG: 17
-------------------------------------------
itag:                               18
Video duration:                    153 seconds
File size:                  11,214,138 bytes
Downloading time:               173.10 seconds
Average speed:                   63.27 kB/s
-------------------------------------------
itag:                               22
Video duration:                    153 seconds
File size:                  14,138,472 bytes
Downloading time:               217.93 seconds
Average speed:                   63.36 kB/s
-------------------------------------------
itag:                               299
Video duration:                    153 seconds
FAILED FOR ITAG: 299
-------------------------------------------
itag:                               303
Video duration:                    153 seconds
FAILED FOR ITAG: 303
-------------------------------------------
itag:                               298
Video duration:                    153 seconds
FAILED FOR ITAG: 298
-------------------------------------------
itag:                               302
Video duration:                    153 seconds
FAILED FOR ITAG: 302
-------------------------------------------
itag:                               135
Video duration:                    153 seconds
File size:                   6,208,058 bytes
Downloading time:               122.04 seconds
Average speed:                   49.68 kB/s
-------------------------------------------
itag:                               244
Video duration:                    153 seconds
File size:                   6,837,041 bytes
Downloading time:               105.71 seconds
Average speed:                   63.16 kB/s
-------------------------------------------
itag:                               134
Video duration:                    153 seconds
File size:                   4,026,665 bytes
Downloading time:                63.20 seconds
Average speed:                   62.22 kB/s
-------------------------------------------
itag:                               243
Video duration:                    153 seconds
File size:                   5,171,509 bytes
Downloading time:                81.13 seconds
Average speed:                   62.25 kB/s
-------------------------------------------
itag:                               133
Video duration:                    153 seconds
File size:                   2,159,725 bytes
Downloading time:                33.38 seconds
Average speed:                   63.19 kB/s
-------------------------------------------
itag:                               242
Video duration:                    153 seconds
File size:                   2,763,583 bytes
Downloading time:                54.37 seconds
Average speed:                   49.64 kB/s
-------------------------------------------
itag:                               160
Video duration:                    153 seconds
File size:                   1,266,220 bytes
Downloading time:                19.74 seconds
Average speed:                   62.63 kB/s
-------------------------------------------
itag:                               278
Video duration:                    153 seconds
File size:                   1,521,172 bytes
Downloading time:                23.55 seconds
Average speed:                   63.09 kB/s
-------------------------------------------
itag:                               139
Video duration:                    153 seconds
FAILED FOR ITAG: 139
-------------------------------------------
itag:                               140
Video duration:                    153 seconds
File size:                   2,483,951 bytes
Downloading time:                38.71 seconds
Average speed:                   62.67 kB/s
-------------------------------------------
itag:                               249
Video duration:                    153 seconds
File size:                     921,501 bytes
Downloading time:                18.21 seconds
Average speed:                   49.41 kB/s
-------------------------------------------
itag:                               250
Video duration:                    153 seconds
File size:                   1,027,795 bytes
Downloading time:                20.27 seconds
Average speed:                   49.51 kB/s
-------------------------------------------
itag:                               251
Video duration:                    153 seconds
File size:                   1,864,592 bytes
Downloading time:                29.29 seconds
Average speed:                   62.16 kB/s


@picheljitsu
Copy link

picheljitsu commented Apr 28, 2023

Wow. You are right. Its working fine now....for some reason. I have no idea what it is then. Maybe youtube was messing around with their API or something.

funnily enough I just tried downloading a video and got streamingData error again. That said I was able to download the video normally right after and the issue was actually with downloading the audio file image

I did some debugging on the request and for some reason, 90% of the time, the response errors out. Might be good to throw in some error handling when the status returns ERROR from the stream_data() method.

DEBUG:root:{'User-Agent': 'Mozilla/5.0', 'accept-language': 'en-US,en', 'Content-Type': 'application/json'}
DEBUG:root:_execute_request() response headers
DEBUG:root:url -> https://www.youtube.com/youtubei/v1/player?videoId=8_Xs8nzrrkM&key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8&contentCheckOk=True&racyCheckOk=True
DEBUG:root:dict_items([('User-agent', 'Mozilla/5.0'), ('Accept-language', 'en-US,en'), ('Content-type', 'application/json')])
DEBUG:root:urlopen request status: 200 (timeout 10)
DEBUG:root:{'User-Agent': 'Mozilla/5.0', 'accept-language': 'en-US,en'}
DEBUG:root:_execute_request() response headers
DEBUG:root:url -> https://youtube.com/watch?v=8_Xs8nzrrkM
DEBUG:root:dict_items([('User-agent', 'Mozilla/5.0'), ('Accept-language', 'en-US,en')])
DEBUG:root:urlopen request status: 200 (timeout <object object at 0x000001F589D447C0>)
playability_status().player_response --> responseContext, playabilityStatus, streamingData, playerAds, playbackTracking, videoDetails, playerConfig, storyboards, microformat, cards, trackingParams, attestation, videoQualityPromoSupportedRenderers, messages, adPlacements, frameworkUpdates
playability_status().status_dict --> False
DEBUG:root:check_availability(self) status, messages --> (None, [None])
playability_status().player_response --> responseContext, playabilityStatus, streamingData, playerAds, playbackTracking, videoDetails, playerConfig, storyboards, microformat, cards, trackingParams, attestation, videoQualityPromoSupportedRenderers, messages, adPlacements, frameworkUpdates
playability_status().status_dict --> False
DEBUG:root:check_availability(self) status, messages --> (None, [None])
DEBUG:root:streaming_data(self) vid_info--> responseContext,playabilityStatus,trackingParams,playerSettingsMenuData
DEBUG:root:{'status': 'ERROR', 'reason': 'This video is unavailable', 'errorScreen': {'playerErrorMessageRenderer': {'subreason': {'runs': [{'text': 'Watch on the latest version of YouTube.', 'navigationEndpoint': {'clickTrackingParams': 'CAAQu2kiEwjXoJ365Mv-AhWhhOUHHfdlAyg=', 'urlEndpoint': {'url': 'market://details?id=com.google.android.youtube&url=https%3A%2F%Fwww.youtube.com%2Fwatch%3Fv%3D8_Xs8nzrrkM', 'target': 'TARGET_NEW_WINDOW'}}}]}, 'learnMore': {'runs': [{'text': 'Learn more', 'navigationEndpoint': {'clickTrackingParams': 'CAAQu2kiEwjXoJ365Mv-AhWhhOUHHfdlAyg=', 'urlEndpoint': {'url': '//support.google.com/youtube/answer/12318250?hl=en', 'target': 'TARGET_NEW_WINDOW'}}}]}, 'reason': {'runs': [{'text': 'The following content is not available on this app.'}]}, 'thumbnail': {'thumbnails': [{'url': '//s.ytimg.com/yts/img/meh7-vflGevej7.png', 'width': 140, 'height': 100}, {'url': '//s.ytimg.com/yts/img/meh7-vflGevej7.png', 'width': 140, 'height': 100}]}}}, 'skip': {'playabilityErrorSkipConfig': {'skipOnPlayabilityError': False}}, 'contextParams': 'Q0FFU0FnZ0I='}
DEBUG:root:{'User-Agent': 'Mozilla/5.0', 'accept-language': 'en-US,en', 'Content-Type': 'application/json'}

@Afiyetolsun
Copy link

Same!

@GrenManSK
Copy link

I took a look at code and I think it's from Youtube part here's screenshot

image

Half of it are Tracebacks also when I entered embed_url to browser it said

image

Translation: Video is unavailable

@sumanthrao-maraboina
Copy link

First locate pytube library location

Screenshot 2023-04-28 195628

Click on "innertube.py" and edit the code on line 78 replacing client='ANDROID' with client='WEB'

image

It worked pretty well for me but the problem is downloading video or audio is slow

@ymk201
Copy link

ymk201 commented Apr 30, 2023

I did a little digging and noticed there was a JSON returned by the api but it included an error message referring to android. Which is strange because I'm on a laptop. So I dug around and made a quick trial change and am having limited success. The change is in innertube.py line 78. I just changed the default client to 'WEB'...

class InnerTube:
    """Object for interacting with the innertube API."""
    #def __init__(self, client='ANDROID', use_oauth=False, allow_cache=True):
    def __init__(self, client='WEB', use_oauth=False, allow_cache=True):
        """Initialize an InnerTube object.

Can anyone else confirm that works for them? Some have reported this is intermittent so maybe this is just coincidence....

It does not work for me.
For me it seems that stream data of url can not be gathered from youtube.
video audio progressive everything regarding stream does not work.
thumbnail works ^^ lol

@Atris48
Copy link

Atris48 commented Apr 30, 2023

when i change ANDROID to WEB, pytube make url that dose not work for me and i got Access to rr4---sn-ab5sznly.googlevideo.com was denied error,
url:
https://rr4---sn-ab5sznly.googlevideo.com/videoplayback?expire=1682861026&ei=ghdOZKulLfuO_9EPudSDgAg&ip=2602%3Aff65%3Aaaa%3Ac014%3A%3A1bef&id=o-AHi6yPrHMJX1LZ2izKfc04-ryzqWQ70ei-Vfo7enouQY&itag=18&source=youtube&requiressl=yes&mh=_p&mm=31%2C26&mn=sn-ab5sznly%2Csn-p5qlsny6&ms=au%2Conr&mv=m&mvi=4&pl=62&gcr=us&initcwndbps=166250&spc=qEK7BzYBiHWQLnBeASMRtKSRGl6uNlGPs50n4fJOUg&vprv=1&mime=video%2Fmp4&ns=zn4A9uFmegN-r05YtmjL1-kN&gir=yes&clen=3094224&ratebypass=yes&dur=166.231&lmt=1676402788453012&mt=1682839025&fvip=5&fexp=24007246&c=WEB&txp=5319224&n=db-2s9uXtufDiPqy2Y&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cgcr%2Cspc%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cratebypass%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgeB_yzTDU4rKDFEIsv8K83u2cwq2CljhWY5wB3Z6zjy8CIQCqyrmp2OaWiBTV1-X6w9yYUKvE_MC99UbHlPCievrIMg%3D%3D&sig=OcddzTabdhC3wxc7ol1WVOforviEatjqp0MXIihJiCMuAEOAPoGfdtzoPrde9ADxza%3DHhkTrCPpkbfg0Jzmh6S5tD0PAhIgRw8JQ0qOvqO

and it is one of the url of pytube that i decode it but its didnt work too:

https://rr4---sn-ab5sznly.googlevideo.com/videoplayback?expire=1682861026&ei=ghdOZKulLfuO_9EPudSDgAg&ip=2602%3Aff65%3Aaaa%3Ac014%3A%3A1bef&id=o-AHi6yPrHMJX1LZ2izKfc04-ryzqWQ70ei-Vfo7enouQY&itag=18&source=youtube&requiressl=yes&mh=_p&mm=31%2C26&mn=sn-ab5sznly%2Csn-p5qlsny6&ms=au%2Conr&mv=m&mvi=4&pl=62&gcr=us&initcwndbps=166250&spc=qEK7BzYBiHWQLnBeASMRtKSRGl6uNlGPs50n4fJOUg&vprv=1&mime=video%2Fmp4&ns=zn4A9uFmegN-r05YtmjL1-kN&gir=yes&clen=3094224&ratebypass=yes&dur=166.231&lmt=1676402788453012&mt=1682839025&fvip=5&fexp=24007246&c=WEB&txp=5319224&n=db-2s9uXtufDiPqy2Y&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cgcr%2Cspc%2Cvprv%2Cmime%2Cns%2Cgir%2Cclen%2Cratebypass%2Cdur%2Clmt&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIgeB_yzTDU4rKDFEIsv8K83u2cwq2CljhWY5wB3Z6zjy8CIQCqyrmp2OaWiBTV1-X6w9yYUKvE_MC99UbHlPCievrIMg%3D%3D&sig=OcddzTabdhC3wxc7ol1WVOforviEatjqp0MXIihJiCMuAEOAPoGfdtzoPrde9ADxza%3DHhkTrCPpkbfg0Jzmh6S5tD0PAhIgRw8JQ0qOvqO&mim=video/mp4&title=BAMBA+(Slowed+++Reverb)

@ai792
Copy link

ai792 commented May 3, 2023

Hi all! Try this: #1586 (comment)

@NannoSilver
Copy link

For those that are not aware, @felipeucelli developed a fix that is available here:

https://github.com/pytube/pytube/pull/1575/files

@richardforth
Copy link

class InnerTube:
    """Object for interacting with the innertube API."""
    #def __init__(self, client='ANDROID', use_oauth=False, allow_cache=True):
    def __init__(self, client='WEB', use_oauth=False, allow_cache=True):

fixed it for me, in innertube.py

@jxth0
Copy link

jxth0 commented May 6, 2023

I am having same problem to download audio as well as video duration (seconds).

The problem started on 18 April, intermittently, and in recent hours it because very severe. While still is possible to download some audios, it is quite hard to get it work.

same here i dont know what problm lol

@mueller91
Copy link

Seems like the current pytube 15.0.0 fixed it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.