https://github.com/nficano/pytube/issues/497
We have created it based on this content.
Main.py source code modification length(self) Return value correction
Change before return self.player_config_args['length_seconds']
After change return self.player_config_args['player_response']['videoDetails']['lengthSeconds']
__main__.py
@property
def length(self):
"""Get the video length in seconds.
:rtype: str
"""
return self.player_config_args['length_seconds']
__main__.py
@property
def length(self):
"""Get the video length in seconds.
:rtype: str
"""
return self.player_config_args["player_response"]["videoDetails"]['lengthSeconds']
Recommended Posts