For anyone that got an error at the 11:30 mark, this is the solution i used The issue in the code is that the while loop that is intended to fetch additional pages of playlist items is not using the next_page_token to request the next page. Instead, it is making the same request repeatedly without updating the pageToken parameter. This leads to an infinite loop, as it keeps fetching the same page repeatedly. Here's the corrected version of the code: playlist_id = 'UUMki_UkHb4qSc0qyEcOHHJw' def get_video_ids(youtube, playlist_id): video_ids = [] request = youtube.playlistItems().list( part="snippet, contentDetails", playlistId=playlist_id, maxResults=50 ) response = request.execute() for item in response['items']: video_ids.append(item['contentDetails']['videoId']) next_page_token = response.get('nextPageToken') while next_page_token is not None: request = youtube.playlistItems().list( part="snippet, contentDetails", playlistId=playlist_id, maxResults=50, pageToken=next_page_token # Add pageToken to request the next page ) response = request.execute() for item in response['items']: video_ids.append(item['contentDetails']['videoId']) next_page_token = response.get('nextPageToken') return video_ids In this corrected version, the pageToken=next_page_token parameter is added to the subsequent requests inside the while loop. This ensures that each iteration of the loop fetches the next page of playlist items instead of repeating the same request.
@PatricioNeriGarcia5 ай бұрын
Thas why I love fkin programming community. Thanks !
@moonrisementality4 ай бұрын
Wow, I have been stuck on this part for like 2 days. I don't know why I didn't come to the comments sooner. Thanks so much!
@Thuvu53 жыл бұрын
Hope you enjoyed this video! I forgot to mention one thing important, please remove your API key in the notebook before you post your project to Github. This is to prevent other people from using your API keys without your consent 🙂
@rarescrunchie2 жыл бұрын
Please I can't find the Items when I run the JSON response , It only shows kind , etag and pageInfo
@nickclinton8845 Жыл бұрын
Hi , I want to know how to scrape video ids using multiple playlist ids as a code coz you showed only for one id
@jeevankumarthadikonda71512 жыл бұрын
Please add more of this kind of projects, your way of explanation, information gathering is simply superb where we won't be able to find from others instructors and KZbin videos
@k_celebs__ Жыл бұрын
For anyone that got an error at the 15:58 mark, this is the solution I used The apply function in the second line is correctly using the isodate.parse_duration function to convert the duration string to a timedelta object. However, when you try to convert the resulting timedelta object to seconds using astype('timedelta64[s]'), it won't work as expected. You should modify the code as follows: # convert duration to seconds import isodate video_df['durationSecs'] = video_df['duration'].apply(lambda x: isodate.parse_duration(x).total_seconds()) In this modification, the total_seconds() method is used to convert the timedelta object to the total duration in seconds. This should give you the correct result for the video durations in seconds.
@KaraboMoremi2 жыл бұрын
Finally done with my project. I learned so much. Rewatched this video many times. It's true that you learn by doing and not just by watching. Thank you so much.
@Thuvu52 жыл бұрын
Aww well done! Congratulations! 🎉 I’m happy to hear you learned a thing or two from this project 😀
@simu63152 жыл бұрын
hey !can u help me out I don't know y but the code is not showing output when i wrote the first def function also json to beautify it is also not working
@dannychang21002 жыл бұрын
This channel is an absolute gem!
@Thuvu52 жыл бұрын
Aw that's so kind of you to say! 😇 I really appreciate it!
@jeeyuuni2 жыл бұрын
this video helped so much! honestly the analytic skills i learned through this video is way more helpful than a whole semester of my python course at uni. thanks a lot!!
@B1GODE103 жыл бұрын
Your channel is obviously going to be big, only 800+ subscribers right now but the quality is clear. Thanks for the video.
@Thuvu53 жыл бұрын
Aww thank you for such an encouraging comment!! I’m so happy to hear that 🥲💛
@HappyPurpleFella7 ай бұрын
Haha you were right
@edudc62612 жыл бұрын
i've just started work on my github profile to be a data scientist, this project gonna be a great project idea
@kylajuett-she-ella32912 жыл бұрын
Thanks for this video! Your content is well-explained & I like that you talk through your process as you go along. I haven’t worked with API keys yet, but look forward to doing a project similar to this one some time.
@jeo22223 жыл бұрын
This video was recommend to me out of the blue, and I am really glad it did! Really enjoyed it, thank you!
@Thuvu53 жыл бұрын
I’m so glad to hear that! Thanks for watching 😀
@sahanaramachandran4007 Жыл бұрын
This was my first proper data science project, and I absolutely loved every minute of making this! Thank you so much!
@mahmoudkhattab111 Жыл бұрын
WooooW , great effort, Thank you so much, All the best and waiting for more videos
@have21482 жыл бұрын
Thanks for this incredible video, I have learned a lot while following these steps. Hope you all well and look forward for upcoming videos, cheers!
@Thuvu52 жыл бұрын
Thank you so much for watching, Robert! 🙌
@SwaraNaidu1333 Жыл бұрын
Wow!! well explained
@Rama_Guru Жыл бұрын
That's great, your style and speed is perfect for me. I will be looking at more. And I did sub.
@konradnoises Жыл бұрын
I've been having an issue with this video. Because I'm trying to give millions of likes, but it allows me one like (that's absurd)!!!! It's a shame because your content deserves a lot of love. Thank you for your dedication!
@Thuvu5 Жыл бұрын
Aw thank you for being so kind!!! 💜
@datboi1861 Жыл бұрын
Your video was the perfect introduction to KZbin's API. Thank you for this.
@Thuvu5 Жыл бұрын
Glad you enjoyed it!
@annette47182 жыл бұрын
Awesome video and awesome content. Definitely deserves way more views. Thank you for sharing this with us!!
@abdelrhmanhamdy2370 Жыл бұрын
fantastic explanation, precise and to the point, I'm happy that I found this channel
@Thuvu5 Жыл бұрын
Glad to hear it! 🙌
@baophuctran48782 жыл бұрын
I’d say that this is the first Python project video I watched til the end, also my first comment for a DA content on YT:)) Though there are ton lines of code that look intimidating to me (as a intermediate Python learner), I finally got the idea of how a real analytic project was made from scratch. Can’t believe that! From Git to API request to EDA to visualization, everything I’d learnt or heard about before is now brought together in this high-level tutorial, so inspiring! Shout out to you ThuVu! Keep up your good work! I hope to see many more contents like this on your channel!
@Thuvu52 жыл бұрын
Thank you BaoPhuc! I’m so glad you liked the video and found it useful 🔥🙌
@zahraBatenin6 ай бұрын
Great repository you made. Excellent job.💫
@MM-jr5sr Жыл бұрын
This is exactly how this kind videos are supposed to be.🎉
@plor12619 ай бұрын
okay, fine. You've earned my like and subscribed lol This was excellent. Perfect flow, descriptions, and all meat. Thank you
@andreyseas2 жыл бұрын
Great video! Love your authenticity. :) Keep it up!
@Thuvu52 жыл бұрын
Hey Andrey, thank you for the compliment! Haha I’m trying to be more authentic in the videos and that’s great to hear!
@nannapatjochmann2 жыл бұрын
Thanks
@TheMISBlog2 жыл бұрын
Love the details in the video Thu, Thanks
@deepasarojam14332 жыл бұрын
Great video again Thu Vu! I'm going to do this in coming week. Thank you for such quality content.
@Thuvu52 жыл бұрын
Thank you Deepa! I'm glad it was helpful 🤩
@kevinanggito312 жыл бұрын
This is very good quality content! the project is very interesting! thanks for sharing with us here! good luck with your channel. Already subscribed to this channel!
@Thuvu52 жыл бұрын
Aw that's so kind of you 😇. Really glad you liked the video and thanks for subscribing! 👋
@deepaksaldanha2 жыл бұрын
Thank you for this video, very well explained. All the best for your channel.
@Thuvu52 жыл бұрын
Thank you for leaving these kind words Deepak! 🙌
@oyvindknustad2 жыл бұрын
Fantastic video. I'm just starting to look into API's and this was very helpful. I thought I'd do a project that might benefit my girlfriend's KZbin channel. It's a small channel with a big heart and deserve more eyes. Wish me luck
@Thuvu52 жыл бұрын
Aw that’s awesome! Good luck 🍀
@chamdarigdall2735 ай бұрын
You are the best! 🔥
@raffymcfee98467 ай бұрын
Thank you Thu Vu for the project I can add this to my own data portfolio and resume show off! New Subscriber here!
@Thuvu57 ай бұрын
That’s awesome to hear! Good job 🎉
@priyankagaikwad602 жыл бұрын
I like your new unique and intresting content , very helpful for me learning data science
@durkcarter2 жыл бұрын
Thank you, really learning from this, especially when making mistakes!
@oilgas10162 жыл бұрын
If u could demonstrate cloud environment that data scientist to deploy project, that would be wonderful. Great content! Thanks.
@Thuvu52 жыл бұрын
Hey, that’s a good idea! Thank you for the suggestion, I’ll keep it in mind for future videos!
@馬正軒-i5y Жыл бұрын
I am from Taiwan. Thank you so much🙏
@pikineestest73622 жыл бұрын
Very really work. I like this challenge. Thanks for sharing.
@Thuvu52 жыл бұрын
Glad to hear you liked it!! 🙌
@edilsonsousa37432 жыл бұрын
Great project, thank you so much!
@patrickp21952 жыл бұрын
Awesome video thank you! I loved learning about this library through your video. If possible, please make another video on how to deploy this dashboard so we can share it. I tried following the user guide but i got stuck, so it would be awesome if you could do a walk through. thanks again!
@Thuvu52 жыл бұрын
Thanks Patrick for the suggestion! Deploying and sharing dashboard is definitely high on my list for upcoming videos 🙌
@akhila94132 жыл бұрын
This channel is goin to get big
@Thuvu52 жыл бұрын
Thank you so much Akhil! 😇
@akhila9413 Жыл бұрын
@@Thuvu5 I told you your channel is going to get big and I am glad it did get big
@KaraboMoremi2 жыл бұрын
This video was sooo good. I really learned a lot. I will go over it a couple more times just to see it in more detail.
@Thuvu52 жыл бұрын
So great to hear Karabo! That really warmed my heart 😄. Have fun with the project!!
@Ayoubased3 жыл бұрын
such an interesting video. So many concept covered. I will be sure to apply this project on another youtuber and get some cool insights but I'm sure I will stumble across to many error and hope you will be here to help haha. Thank you sm
@Thuvu53 жыл бұрын
Hey, thanks for commenting! Hope you’ll have a lot of fun applying this project to your favorite KZbinr!! Of course you can always reach out to me if there are problems, I love solving errors 😉
@Ayoubased3 жыл бұрын
@@Thuvu5 thank you so much, thats so motivating for me.
@bangsaenAI4 ай бұрын
This is what I am looking for
@thomasantony3381 Жыл бұрын
Sending a lot of love ❤️
@Actanonverba01 Жыл бұрын
Very clear code and well explained, Great job! 😎
@desafiodatascience2 жыл бұрын
Wow super interesting Thu Vu! I might and try to replicate it to my own little channel! Thanks for sharing the project with us! Carlos.- on
@annarocha9769 Жыл бұрын
Thank you soooooooooo much this is awesome!!! 💕💕💕💕
@iCodeCode Жыл бұрын
Thank you so much for this awesome video! Even tho I use JavaScript, your explanation was fairly simple and easy to understand.
@Thuvu5 Жыл бұрын
Glad it helped!
@shanthankasula55033 ай бұрын
If you get an error at 15:20...that's because we need to import parse library.. here is the code: from dateutil import parser
@jek13083 жыл бұрын
Eye opener...You are pro
@lelumpolelum28882 жыл бұрын
you are a lifesaver!! thank you
@lengleng40433 жыл бұрын
First one here 😃! Greetings from Slovakia.
@Thuvu53 жыл бұрын
Haha you were the one who unboxed this video 🤩
@lengleng40433 жыл бұрын
@@Thuvu5 yay 😊!
@medlapino3 жыл бұрын
Great video again , thank you thu vu
@Thuvu53 жыл бұрын
Thank you Amine for always supporting me! 🤗
@medlapino3 жыл бұрын
@@Thuvu5 you deserve all support for your all efforts to help us
@konstangu86813 жыл бұрын
Great, more reviews like this. Greetings from Russia!!!
@vishalnaik5453 Жыл бұрын
If you are using Jupyter Notebook and getting output as : "" instead of importing JSON from IPython.display Use this import json ... .. formatted_response = json.dumps(response, indent=2) print(formatted_response)
@workorion14732 жыл бұрын
Thanks for this video.
@meomeoww.w Жыл бұрын
So clear, thank you chị ❤❤
@eshaanghoshfushtukli3 жыл бұрын
quality content, thank you so much
@Thuvu53 жыл бұрын
Thank you for commenting! Glad to hear you enjoyed it 😄
@souhamahmoudi77452 жыл бұрын
Thank u ! Thats awesome
@iJavaScript Жыл бұрын
I really like this video, and the way you made it look easy! Heres an idea, I wonder if you can ceate.. Explain how to download video captions and store them in a dictionary, where the key is the a word and the value is an array that contains the video ID and the time in that video!
@CaribouDataScience Жыл бұрын
Thanks , that was helpful.
@AngelFelizF2 жыл бұрын
This was a great video. I enjoyed it even though I just know R
@Thuvu52 жыл бұрын
Haha nice!! Thanks so much Angel 😁
@loudarakotondrafara Жыл бұрын
If some of you are getting this kind of ugly output () when running JSON(response), use Jupyter lab instead of notebook as she advised 🙂
@zahir42152 жыл бұрын
content you provided are just awesome, Thank you Thu vu, I thought of storing the data to azure cloud and build a data pipeline to further present my data in tabluae, I have no experience with data pipelines, Would you please provide your review on how this can be accomplished... Thanks Again
@dana_knows Жыл бұрын
Great video, thanks! I try to repeat your project for crochet channels and I have an error on the counting number of tags. type object 'str' has no attribute 'len'.
@궁금궁금-j3k2 жыл бұрын
This is the best video ever. Thanks to that, I was able to try the KZbin API with Python. But I have a question. How do I get traffic sources? Should I use the KZbin Reporting API at this time?
@Thuvu5 Жыл бұрын
Hey, I’m not sure about how to get the traffic sources.. so I can’t helpmuch with this one..
@궁금궁금-j3k Жыл бұрын
@@Thuvu5 Thank you for your reply. It's all right. Still, the video helped me a lot. I appreciate it!
@OriginalAfricanTales Жыл бұрын
weldone and thank you!
@tate_01372 жыл бұрын
Thanks so much for your guidelines! As an absolute beginner in Python (and just get to know API from codecamp), your instruction is so easy to follow, yet it covers different perspectives and layers when it comes to analyze data. I just stood in awe watching your inspiring video!! I'm trying to practice following your github code and I have a question. If I analyze 10 channels at a time, then I have to repeat the "get videos IDs from upload playlist IDs" 10 times, am I right? I see you used the variable -playlist_id- in your codes. I tried to make use of the -join- command to see if it can retrieve all upload videos ID from 10 channels but it didn't seem to work :( For now I just repeat the codes and I already had my first ever data project! Thank you so so much!
@fromsunshinetomoonshine10 ай бұрын
Love this video, it was very helpful! My only thing is I'm stuck in an infinite loop and can't get out in terms of video IDs :( My code looks exactly like yours
@lavenderscent2334 Жыл бұрын
What are some concepts we should learn abt so we can do this project?
@rhemzyputramaulana70252 жыл бұрын
hey thu i really enjoy with ur vides thank u so much, i wanna ask something after we got this channel's data how to make this dataset into csv? thanks before!
@MostafaHafez252 жыл бұрын
Hello, great video. I have a problem with the playlist id. I tried making a list of different playlist ids and using them in the code, but the code crashed. Although when i tried each code separately they all worked?
@shanthankasula55033 ай бұрын
How did you get the id in video statistics? @11:39
@KaraboMoremi2 жыл бұрын
I got stuck in my project at the next page token park. The channel I'm analyzing has 86 total videos. By default I get 50 video_ids but I need all 86. The while loop with "is not None" loops Infinitely 😭😭
@Thuvu52 жыл бұрын
Hi Karabo, I think I know what caused it to go into infinite loop, I had it once 😅. Please make sure you include ‘page_token = next_page_token’ in the request within the is not None loop.
@KaraboMoremi2 жыл бұрын
IT WOOORRRKKKEEED🏅🏅🏅😭😭😭🤝🏽🤝🏽🤝🏽
@Thuvu52 жыл бұрын
@@KaraboMoremi Yay!!!!
@manuelespitia102 жыл бұрын
@@Thuvu5 @Karabo Moremi Guys I'm having the same problem, but when I include 'page_token = next_page_token' in the request list within the is not None loop I got an error 'got an unexpected argument 'page token''. Also, great video, thanks for sharing all this!!!
@KirillP-b1v3 жыл бұрын
nice) more videos on how to retrieve data from the API please)
@Thuvu53 жыл бұрын
Yes! That sounds like a great idea 😊. Thank you for commenting!
@krishkathuria3719 Жыл бұрын
Hi! thank you for this video its really helpful. Can you plz provide the code for fetching comments, your repo doesn't have that
@theawesomeharris Жыл бұрын
I was playing with the notebook and ended up with almost 10k video ids then I realize how the api request did not run fully to grab all the ids that I had to run a few times to get it right. 😂😂
@oraciobarbosa28432 жыл бұрын
Great video!!! How many time did it take you to program it?
@Thuvu52 жыл бұрын
Hi Oracio, thanks! 👋 It took me about 15 hours for data extraction and about 3 hours for data preprocessing and EDA
@naresh6961 Жыл бұрын
Hi Madam, Your explanation is awesome. I need full Road map and guidance to become data analyst in 30 days. Could you please provide learning content, where can I get all the details. Thanks in advance.
@fiestaamigos3084 Жыл бұрын
Hi , It is really usefull, I am new to DS & I want help on KZbin Data Harvesting and Warehousing using SQL, MongoDB and Streamlit by creating a Streamlit application. Can you help on the details on how should I start as it is my first project.
@stevensalazar62963 жыл бұрын
@Thu Vu FYI Luke Barousse mentioned you in his latest video about SQL.
@Thuvu53 жыл бұрын
Thanks Steven for letting me know! I just saw his video, I’m so flattered 😂
@stevensalazar62963 жыл бұрын
@@Thuvu5 I actually found your channel a few days ago through the algorithm and then I saw your name on Luke's channel today. You have great high quality content and your channel will grow a lot, wish you the best!
@Thuvu52 жыл бұрын
Aw I’m glad you found my channel! 👋 Thank you so much for your kind words, I really appreciated it 😃
@DataQuestLive Жыл бұрын
So I know I am about a mont late but I essentially copied exactly what you did up until the the retreiving the number of videos and even copied and pasted your number of videos ID function from your github and its not counting all the videos there are like close to 100 missing what could be the reason?
@alexdin15659 ай бұрын
please can you make a video about google keyword planner API using python?
@vuquano49612 жыл бұрын
very good video
@geekymahi38962 жыл бұрын
Hey you've done a great job making this video, but is there any other way to get channel id, since this method doesn't work any more.Please help
@Thuvu52 жыл бұрын
Hi Mahesh, thanks for watching! Good to know that this method no longer applies. But it's actually quite simple to obtain channel id otherwise. On any video of a channel you want to get channel ID, open developer console (Ctrl+Shft+I on Windows or Command+Option+I on Mac). Then go to the Element tab and search (Ctrl+F) for "/channel/", then you should find some results of the href of the channel link. Then the long weird string after "/channel/" in the href should be the channel ID. Hope this helps. Good luck!
@Rapha_Carpio2 жыл бұрын
I need this, I got a code that works a bit =) but I don't like how the outcome looks like; I will look at this video to learn more
@Thuvu52 жыл бұрын
Hey Rapha! Thanks for commenting 👋 Hope you’ll get some nice outcome from the video!
@Rapha_Carpio2 жыл бұрын
@@Thuvu5 To be honest I dont understand much, I just run the code and change the API to use mine, I would love to connect with you to show you my work on KZbin API if you-re into that
@MasdarulRizqi9 ай бұрын
please provide the full code in the comments or duration 13:26
@sikandar082 жыл бұрын
for some reason when I get all the video stats with video_df I only get 250 results (250 X 13 columns). I'm using the same code as you but you get thousands so I'm confused. (there are definitely more than a thousand videos) I think the next page thing isn't working for me...
@Karma-e7b7 ай бұрын
If I create a project using youtube api and in my project I show youtube videos and put ads or subscription on website. Or will some copyright come.What if I don't want copyright issue to appear on my website?
@siramar24532 жыл бұрын
Pls Suggest such Job Oriented & Good Quality Projects on Power BI Data Analyst which are Highly Relevant For Getting a Job Immidiately
@meriod Жыл бұрын
Hello! Thank you so much for this video! It is really helpful! I tried running the code for a channel that I’m interested in but I’m running into some trouble getting my dataframe populated. It’s always returning as empty. Would you know what’s causing this? 🙂
@Thuvu5 Жыл бұрын
Hey, I’m not sure which function you were having this issue, but I’ve fixed some things in the functions (eg missing return statement ) and pushed them on Git. Please pull those changes and try it again :)
@meriod Жыл бұрын
@@Thuvu5 Thank you so much! Yeah, putting in some missing return function fixed the program! 😀
@gopalreddy939210 ай бұрын
Just love lovee
@prasunnundi74562 жыл бұрын
Hi, i tried to get the id for other channels just the way you did for your example, it didn't worked , plz help!!!!
@naveethsuraj621429 күн бұрын
is it ok to push our code with our API key to GIT?? or we need to make some change.
@DuyTran-xd4qb2 жыл бұрын
chị giỏi quá
@rafaeldesantis42592 жыл бұрын
what is the command you use to order the code you are writing? I think it is really important right here. can you share that, please?
@Thuvu52 жыл бұрын
Hi Rafael, I'm not sure what you meant with "order the code"? Thanks for watching :)
@luiscarlospallaresascanio2374 Жыл бұрын
I'm trying to move videos from one playlist to another but it says I don't have permissions.
@sehaj90352 жыл бұрын
can I run code this project in pychram or VS code?