Python Can';将播放列表添加到帐户后找不到播放列表uri

Python Can';将播放列表添加到帐户后找不到播放列表uri,python,uri,youtube-api,Python,Uri,Youtube Api,我正在尝试制作一些播放列表,其中包含我通过YouTube API找到的视频。此python代码可以创建播放列表: ptitlestart = 'Cute Videos' ptitlecount = 1 while ptitlecount < 6: new_private_playlistentry = yt_service.AddPlaylist(ptitlestart + str(ptitlecount), 'cute pets video playlist for content

我正在尝试制作一些播放列表,其中包含我通过YouTube API找到的视频。此python代码可以创建播放列表:

ptitlestart = 'Cute Videos'
ptitlecount = 1

while ptitlecount < 6:
  new_private_playlistentry = yt_service.AddPlaylist(ptitlestart + str(ptitlecount), 'cute pets video playlist for content coding', True)
  ptitlecount = ptitlecount + 1
ptitlestart='可爱的视频'
ptitlecount=1
当ptitlecount<6时:
new_private_playlingentry=yt_service.AddPlaylist(ptitlestart+str(ptitlecount),“用于内容编码的可爱宠物视频播放列表”,True)
ptitlecount=ptitlecount+1

但是我不知道如何找到我刚刚创建的播放列表的uri。我需要每个播放列表的uri,以便向其中添加视频。感谢你的智慧

您可能希望使用YouTube API来实现这一点,因为它对Python有更好的支持

以下是创建新播放列表并打印播放列表id的代码片段:

playlists_insert_response = youtube.playlists().insert(
  part="snippet",
  body=dict(
    snippet=dict(
      title="Test Playlist",
      description="A playlist created with the YouTube API v3"
    )
  )
).execute()

print "New playlist id: %s" % playlists_insert_response["id"]