My problem
I had a problem with Playlist class. When I tried to download the video, I got an error 'requires login to view'
My solution was to apply use_patch to all videos in the playlist
p = Playlist(input("enter yt playlist url:"))
for video in p.videos:
video.use_oauth=True
video.allow_oauth_cache = True
...
But it is more convenient for users to have 2 additional argument in Playlists inititalizator (Just like in Youtube class) and pass them to Youtube class.
My solution
Add 2 default arguments use_oauth: bool = False, allow_oauth_cache: bool = True, to Playlist initializer. Like that:
p = Playlist(input("enter yt playlist url:"), use_oauth=True)
for v in p.videos:
print(v.title)
ys = v.streams.get_audio_only()
ys.download(output_path='test', mp3=True)
My problem I had a problem with Playlist class. When I tried to download the video, I got an error 'requires login to view' My solution was to apply use_patch to all videos in the playlist
But it is more convenient for users to have 2 additional argument in Playlists inititalizator (Just like in Youtube class) and pass them to Youtube class.
My solution Add 2 default arguments
use_oauth: bool = False
,allow_oauth_cache: bool = True
, to Playlist initializer. Like that:Example