Data pull
We start the analysis by selecting the channel and the video. For the purpose of this chapter we select the Sony PlayStation YouTube channel, as it is one of the most popular brands in the entertainment sector. We find its URL by performing a search on the YouTube search engine and get a result similar to the following: https://www.youtube.com/channel/UC-2Y8dQb0S6DtpxNgAKoJKA
The ID of the channel corresponds to the last element of the URL, which in this case is UC-2Y8dQb0S6DtpxNgAKoJKA
.
In the first place, we will extract the videos with the most views to understand what kind of videos gather most interest from users. In order to perform this task we have to define two functions:
get_channel_videos()
: A function to list all the videos associated with the channelget_statistics()
: A function that collects statistics (number of views, likes, dislikes) for a single video
It is required to split this part in two steps as there is no endpoint that retrieves all the videos for a channel...