Youtube Command Line Tool: download all videos by user / playlist 批量下载Youtube视频

Categories: Python; Tagged with: ; @ February 21st, 2016 13:50

Features:

  •  download all videos by user id 下载指定用户的所有视频
  • download all videos by playlist id 下载指定播放列表的所有视频
  • skip the previously downloaded files 跳过已下载视频

Usage:

  1. pip install rabbityoutube
  2. set google api key
  3. ready to use:
    rabbit-youtube.py -u ChromeDevelopers /tmp/test/

for more details:  http://guoliang-dev.github.io/rabbit-youtube/

Getting all videos by user name using youtube data API V3

Categories: Development Notes; Tagged with: ; @ November 12th, 2015 22:32

I managed to retrieve all videos by user name using v2:

https://gdata.youtube.com/feeds/api/users/GoogleDevelopers/uploads?alt=json&start-index=1&max-results=50&v=2

I haven’t find an API to get all videos directly, however it can be done by two steps (thanks to http://stackoverflow.com/questions/22613903/youtube-api-v3-get-list-of-users-videos) :

Step 1: get the user’s relatedPlaylist (uploads) id by:

GET https://www.googleapis.com/youtube/v3/channels?part=contentDetails&forUsername=GoogleDevelopers&key={YOUR_API_KEY}

Step 2: get all videos by the id retrieved in step 1:

GET https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=UU_x5XG1OV2P6uZZ5FSM9Ttw&key={YOUR_API_KEY}



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.