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

pafy.get_playlist() HTTP error #285

Open
tdrvlad opened this issue Feb 16, 2021 · 15 comments
Open

pafy.get_playlist() HTTP error #285

tdrvlad opened this issue Feb 16, 2021 · 15 comments

Comments

@tdrvlad
Copy link

tdrvlad commented Feb 16, 2021

This basic use case throws an error:

import pafy
url = 'https://www.youtube.com/playlist?list=PLm6MuHmcjo3qWG3RdQZoebtUgxvvqASvg'
playlist = pafy.get_playlist(url) 

pafy_cmd_error

Tried multiple playlists. The problem is not the URL. Can youtube block my IP after a certain number of requests?

Thank you in advance for the help.

@brihuega
Copy link

Same problem here

@elsayed-abdelhalim
Copy link

same problem

@noembryo
Copy link
Contributor

noembryo commented Feb 23, 2021

Yeap, same here..

EDIT: Problem with get_playlist2 too
EDIT²: youtuube_dl retrieves playlist data almost normally (... except for the image thumbnails ...)
EDIT³: I now get a 403 that looks the same as #286

@noembryo
Copy link
Contributor

After solving the "403" problem by providing my own API key I get the "404" error again.. 😞

@tdrvlad
Copy link
Author

tdrvlad commented Mar 1, 2021

No-one found a work-around so far? Similar libraries?

@noembryo
Copy link
Contributor

noembryo commented Mar 1, 2021

Nope..
The 'http://www.youtube.com/list_ajax?style=json&action_get_list=1&list=%s' undocumented API link that retrieved the json data for < 200 tracks, does not exists anymore... 😢
Only scraping the playlist's page might work now...

@tdrvlad
Copy link
Author

tdrvlad commented Mar 2, 2021

@noembryo but urls for direct videos still work?

@noembryo
Copy link
Contributor

noembryo commented Mar 2, 2021

Yes, video links are unaffected..

@Steeeephen
Copy link

No-one found a work-around so far? Similar libraries?

https://github.com/alexmercerind/youtube-search-python worked for me, seems to have a lot of the same functionality @tdrvlad

@estibencode
Copy link

In my opinion the best option would be to use pafy accompanied by the pytube library as follows

code

@estibencode
Copy link

`import pafy
from pytube import Playlist

p = Playlist('https://www.youtube.com/playlist?list=PLS1QulWo1RIaJECMeUT4LFwJ-ghgoSH6n')

for video in p[:3]:
video = pafy.new(video)
best = video.getbest(preftype="mp4")
best.download()
print(video)

`

@jemnimohamed007
Copy link

Same problem

@jemnimohamed007
Copy link

This solution gets just 3 videos from the playlist

@ipsavitsky
Copy link

ipsavitsky commented Mar 8, 2022

get_playlist works only on v1 and v2 versions of Youtube API which are now deprecated. Use get_playlist2() to use Youtube v3 api

@tdrvlad
Copy link
Author

tdrvlad commented Mar 8, 2022 via email

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

No branches or pull requests

8 participants