YouTube Data API Tutorial with Python - Analyze the Data - Part 4

preview_player
Показать описание
In this Python Tutorial we will be learning how to work with the YouTube Data API and analyze channel statistics. This is going to be a 4 part series:

- Part 1: Setup your app and get API Key, and extract basic channel statistics
- Part 2: Get a list of all the videos of a channel
- Part 3: Get in depth statistics for each video
- Part 4: Analyze the data in a jupyter notebook

~~~~~~~~~~~~~~ GREAT PLUGINS FOR YOUR CODE EDITOR ~~~~~~~~~~~~~~

📚 Get my FREE NumPy Handbook:

📓 Notebooks available on Patreon:

If you enjoyed this video, please subscribe to the channel!

The code can be found here:

More:

You can find me here:

#Python #Coding #Tutorial

----------------------------------------------------------------------------------------------------------
* This is a sponsored link. By clicking on it you will not have any additional costs, instead you will support me and my project. Thank you so much for the support! 🙏
Рекомендации по теме
Комментарии
Автор

Wow thanks so much for this series! It's quite up to date vs what else is on Youtube at the moment and quite comprehensive! Kudos and thanks for the work you put into this.

machinimaaquinix
Автор

I watched all the series, thanks from brazil <3

viniciusvianavieira
Автор

This was indeed a great tutorial. Thanks for sharing your knowledge with us!

anibalchaim
Автор

This is one of the best tutorials I have ever done! Thanks a million for what you do!

ericaleverson
Автор

Thanks a lot for your job. Great tutorial. Will definitively check others because i really like what you did here.

meuhmeuhmeuhify
Автор

Wonderful Tutorial. Thank you for coming up with this series, I have subscribed and I'll go through your other videos. I can't wait to see what next you come up with. Thanks once again, this was incredibly helpful.

jeremiahchinyelugo
Автор

I was 2 years late, but anyway thank you so much for this tutorial. That's extremely helpful and understandable.

inaka_life
Автор

Wow Really helpful, Thanks for the valuable knowledge sharing

easywonders
Автор

Your project helped me a lot but I just needed a last help on this. Also why the dumped Json file has no format as Why it does not have square brackets ?

ipsna
Автор

Hello. Many thanks for this series of videos. But there is a problem with the code "yt_stats.py" shared on Github. The very first video of the channel is lost. Using your channel as an example, the first uploaded video, "Lists in Python - Advanced Python 01 - Programming Tutorial" is forgotten. Would you please have a check? Thank you.

hughliu
Автор

Thank you for very clear and detailed instruction!. I just applied this py script to my channel. However it seems like this only works for English text. (my titles are converted into something I could not read). Is there a way to set up encoding within the api? could you give me an example if possible?

fofx
Автор

when i search another channel, there is no items data and i can't get videocount, subscribercout, so on. is there any requirement for channel that can be analyze with this API ? and how many request for this API ?

getpc-usib
Автор

Thank you for this information and video. YouTube API seem to still be changing and fringe, so finding good quality tutorials like this online for free is hard to come by, and I appreciate the info. I do have a couple of questions, though:

1) I have noticed that when after I get all of the video information for a channel in a dataframe, when I count the total number of videos, subscribers, or views in the dataframe, the totals do not match the totals that I get from channel_stats["viewCount"], channel_stats["subscriberCount"], and channel_stats["viewCount"], do you know what may be the issue here?

2) I also noticed that the numbers I get when I access YouTube API are not the most current/accurate. For instance, I know that there are some recently published videos that are not showing up in my video list. As a result, I know the data that I am using is a bit outdated, but do you know how long it takes for the API to be updated? Does it take a week? Two weeks? A month? Can you explain how this works?

jolier
Автор

Thank you for de tutorials. I followed along with great pleasure. A good start to analyse data about Youtube channels.

I experimented a little bit with the Notebook code, not much yet. However following code might be interested: it plots all columns of top10 (or bottom10) in one figure, and saves the figure in a file.

# top10: plot titles and all columns
top10 = df.head(10)
ax = top10.plot.bar(x="title”, figsize=(10, 14), fontsize=8, subplots=True)
# save figure, supported formats: eps, pdf, pgf, png, ps, raw, rgba, svg, svgz


Unfortunatelty, the title text (x-labels) is not saved nicely in the file. Maybe someone has a tip how you can save full x-labels of the plot.

flashypepo
Автор

Thanks for this awesome tutorial series! Has been a great help to pull some data from YouTube in a way that they can be used in Jupyter.
Have subscribed and put on notifications as I really enjoyed this and look forward to learning more.

Couple of questions.
1) I would like to have this run on multiple channel IDs so I can get these jsons generated for a bunch of channels at the same time - can you please advise what this process is called in Python speak so I can Google it to try to find some tutorials?

2) I recreated the Jupyter notebook and was able to run it without issue the first time.
I am now trying to run it using a json created for a different channel and getting an error in the # video statistics cell:

---> 10 comments = int(vid[1]["commentCount"])
11 stats.append([title, views, likes, dislikes, comments])

KeyError: 'commentCount'

Do you know what may be causing this?

Thanks again!

PiesangKop_ZA
Автор

10:16 I'm stuck with this, please help bro :(

----> sorted_vids = sorted(video_stats.items(), key = lambda item: int(item[1]['viewCount']), reverse = True)

KeyError: 'viewCount'

minhhai
Автор

why jupyter not showing my other created environment? please help. thanks!

nayeonim
Автор

Thanks for the tutorial! That's so helpful. I subscribe your channel!
I got a question, if I wanna add the period condition before getting api, how should I add it? -

hiros