get-pytube / pytube3

A lightweight, dependency-free Python 3 library (and command-line utility) for downloading YouTube Videos.
https://pytube3.readthedocs.io
Other
178 stars 55 forks source link

pytube.player_config_args["player_response"] not supported in `pytube3` #75

Open e2jk opened 4 years ago

e2jk commented 4 years ago

When migrating from pytube to pytube3, my code broke due to player_response not existing in pytube3's version of pytube.player_config_args.

In pytube upstream it is defined in file pytube/__main__.py (currently at lines 70 and 146) as:

self.player_response = json.loads(self.player_config_args["player_response"])

Any specific reason why this is not included in pytube3 making the code not backwards compatible? (the same search in the pytube3 repo doesn't return code matches, only this mention about not supporting external access to player_config_args.

FYI I used this to retrieve the channel ID of the author of a video, as in:

yt.player_config_args["player_response"]["videoDetails"]["channelId"]
crd commented 4 years ago

Came here with the same issue -- I was using player_response from pytube to obtain

stream.player_config_args['player_response']['videoDetails']['title']

I can update my code to use stream.title obviously but wanted to echo that this is the only place I've noticed lack of backwards compatibility.

Thanks for your work on pytube3!