6/15/2023 0 Comments Download youtube sub![]() ![]() This function returns a list that contains the available dates and respective values. There are four options for the “var” input: ‘count’, which represents the daily change in subscribers ‘total’, which represents the total amount of subscribers ‘views’, which represents the daily change in channel views and ‘views_tot’, which represents the total amount of channel views. The function, sub_scraper, takes in two arguments - the URL that you are trying to scrape, and the var that you want to scrape. I first defined a function to scrape the targeted data values from SocialBlade. Here is the link to a repo with all of the code. I have intentionally written the code so that it can be reused for many projects. ![]() I have not checked if it works for any other versions or urls on the site. Note: The code I’m sharing here works for SocialBlade urls that end in “/monthly” and were archived before 2019. Once you have the url, you’re ready to start scraping! Here is a link to the Github repo with the scraping code and resulting datasets. ![]() (Right) Archived SocialBlade page for ‘LeafyIsHere’ from December 2016, showing that data is available going back to the channel’s inception, in 2012. (Left) All available dates that SocialBlade page for YouTube user ‘LeafyIsHere’ was archived. The second is that in late 2019, it changed which data is available in accordance with YouTube changing what is available through their API. The first is that it only makes data from the last 3 years publicly available, in order to be compliant with GDPR. However, there are two pitfalls that you might fall into when using SocialBlade. Or, you can take advantage of the fact that SocialBlade has already done this, and scrape your data from the third party website. Now, you could build your own database and update it daily with API calls. If you’ve ever used the YouTube API, you’ll know that you can only get current subscription numbers from it - you cannot go back in time or fetch historical subscription data with the API. In this post, I’ll explain how to scrape subscription and views data for a YouTube channel so you don’t have to go through the same frustrations that I did. In my latest video, I analyzed the impacts of the popular YouTube series Content Cop, and the journey of actually acquiring the data I needed for this was much longer than anticipated. GDPR and YouTube regulations make it harder than you might think ![]()
0 Comments
Leave a Reply. |