python - Youtube API: Adding videos to a playlist with the new 32 character playlist ID -
i've been struggling thought simple task: adding video youtube playlist. i've got uri , video id, should work, right?
uri = "http://gdata.youtube.com/feeds/api/users/dolkarr/playlists/aancxj-nfqzwzyqo69euvzvyj_xofijs" vid = "dmodlyiqykw" video = yt_service.addplaylistvideoentrytoplaylist(uri, vid)
but returns error response:
gdata.service.requesterror: {'status': 400, 'body': 'invalid request uri', 'reason': 'bad request'}
after bit of research, found out works 16 character playlist ids of older playlists have. prefixing "pl" makes no difference. "solved" problem using playlist id doesn't contain "-", unable create such playlist! of them start aancxj-nfq
...
so, i'm asking... there possibility create work? either somehow creating playlist old-style id or making take these... need create several playlists 200 videos each , don't want fill them manually... response!
uri = "http://gdata.youtube.com/feeds/api/users/dolkarr/playlists/aancxj-nfqzwzyqo69euvzvyj_xofijs"
you should remove user/userid, become
uri = "http://gdata.youtube.com/feeds/api/playlists/aancxj-nfqzwzyqo69euvzvyj_xofijs"
check out: https://developers.google.com/youtube/1.0/developers_guide_python#addvideotoplaylist
python youtube-api playlist
No comments:
Post a Comment