Home > Blockchain >  How can I get all "Auto-generated by YouTube" videos from a channel?
How can I get all "Auto-generated by YouTube" videos from a channel?

Time:08-15

How can I get all "Auto-generated by YouTube" videos from a channel?

Here is an example song: La bohème - Kendji Girac

I didn't get it from its channel and even from search results. I got it from a playlist.

It is showing Auto-generated by YouTube.

How can I get all these videos from a specific channel?

CodePudding user response:

You have to get the channel_id of the video you want to get the data from.

For getting the channel_id using the video_id, you can use the videos:list endpoint of the YouTube Data API - example.

Result:

{
  "kind": "youtube#videoListResponse",
  "etag": "y1Zw7S-E_fPwC_hzp3fsJ7l0OCw",
  "items": [
    {
      "kind": "youtube#video",
      "etag": "_1mzRopd5kh5bzsX66yES1K3i9g",
      "id": "wauQivFuVhw",
      "snippet": {
        "publishedAt": "2018-07-26T02:10:16Z",
        "channelId": "UCNpFcllBHQk9wepKzMtouSQ",
        "title": "La bohème",
        "description": "Provided to YouTube by Universal Music Group\n\nLa bohème · Kendji Girac\n\nAznavour, sa jeunesse\n\n℗ 2014 Island Def Jam\n\nReleased on: 2014-01-01\n\nAssociated  Performer, Interprète  Vocal, Guitar: Kendji Girac\nAssociated  Performer, Programming, Keyboards: Christian Dessart\nAssociated  Performer, Keyboards, Programming: Rachid Mir\nStudio  Personnel, Recording  Engineer: Nabil Essemlani\nStudio  Personnel, Asst.  Recording  Engineer: Antonin Deniaud\nProducer, Studio  Personnel, Mixer: The Bionix\nStudio  Personnel, Mastering  Engineer: Eric Chevet\nAuthor: Jacques Plante\nComposer: Charles Aznavour\n\nAuto-generated by YouTube.",
        "thumbnails": {
          "default": {
            "url": "https://i.ytimg.com/vi/wauQivFuVhw/default.jpg",
            "width": 120,
            "height": 90
          },
          "medium": {
            "url": "https://i.ytimg.com/vi/wauQivFuVhw/mqdefault.jpg",
            "width": 320,
            "height": 180
          },
          "high": {
            "url": "https://i.ytimg.com/vi/wauQivFuVhw/hqdefault.jpg",
            "width": 480,
            "height": 360
          },
          "standard": {
            "url": "https://i.ytimg.com/vi/wauQivFuVhw/sddefault.jpg",
            "width": 640,
            "height": 480
          },
          "maxres": {
            "url": "https://i.ytimg.com/vi/wauQivFuVhw/maxresdefault.jpg",
            "width": 1280,
            "height": 720
          }
        },
        "channelTitle": "Kendji Girac - Topic",
        "tags": [
          "Kendji Girac KendjiGirac Aznavour",
          "sa jeunesse La bohème La Boheme La Boheme"
        ],
        "categoryId": "10",
        "liveBroadcastContent": "none",
        "localized": {
          "title": "La bohème",
          "description": "Provided to YouTube by Universal Music Group\n\nLa bohème · Kendji Girac\n\nAznavour, sa jeunesse\n\n℗ 2014 Island Def Jam\n\nReleased on: 2014-01-01\n\nAssociated  Performer, Interprète  Vocal, Guitar: Kendji Girac\nAssociated  Performer, Programming, Keyboards: Christian Dessart\nAssociated  Performer, Keyboards, Programming: Rachid Mir\nStudio  Personnel, Recording  Engineer: Nabil Essemlani\nStudio  Personnel, Asst.  Recording  Engineer: Antonin Deniaud\nProducer, Studio  Personnel, Mixer: The Bionix\nStudio  Personnel, Mastering  Engineer: Eric Chevet\nAuthor: Jacques Plante\nComposer: Charles Aznavour\n\nAuto-generated by YouTube."
        }
      }
    }
  ],
  "pageInfo": {
    "totalResults": 1,
    "resultsPerPage": 1
  }
}

In this case, the channel_id of the video wauQivFuVhw is: UCNpFcllBHQk9wepKzMtouSQ.

Then, with this channel_id, change the second character to U as follows:

  • Unmodified: UCNpFcllBHQk9wepKzMtouSQ
  • Modified: UUNpFcllBHQk9wepKzMtouSQ

This modified id is the Uploads playlist of that said YouTube channel.

With this Uploads playlist_id, you can use the Playlistitem:list endpoint of the YouTube Data API to retrieve all the uploaded videos from the autogenerated channel.

This is the example with the uploads playlist_id described in this answer.

CodePudding user response:

I'm not satisfied with answers, what to do after getting all details of the channel in a JSON file. I want videos to add in a playlist. Specify next steps for Windows

  • Related