Here's how to get channel ID in 2023: 1. Go to the desired channel and right click on the channel page 2. Go to 'View Page Source' 3. On the source page, top left will have 'Line wrap' with a check box, check that box 4. Press ctrl+F on your keyboard to open search tab 5. Type '?channel_id', it will highlight channel ID for you 6. Copy and use it
To those who had problems installing google-api-python-client try these: To install this package run one of the following: conda install -c conda-forge google-api-python-client conda install -c "conda-forge/label/cf201901" google-api-python-client conda install -c "conda-forge/label/cf202003" google-api-python-client conda install -c "conda-forge/label/gcc7" google-api-python-client
This is the first video that I've watched on scraping ANYTHING that I was able to follow from beginning to end, understand, and be able to apply to my own channels and project...without running into problems that couldn't be easily fixed! I could fix my own mistakes because you explained each step so thoroughly. Thank you!!
hi i was scrapping vids from pewdiepie,mrbeast channel and i encountered an error i am able to fetch title and published date of all video_ids but in fetching likes it is showing "" 'KeyError' : 'lkeCount "" and same for viewcount, comment count.. Did you face the same issue and if yes how did youresolve it??
@@ashkraze I did run into that! What I did was use a nested try except block. I put the code from this video on creating the dictionary in try, then, under except, I put the same code, but I commented out the line that was giving me the error. Does that make sense? I needed to nest three more blocks depending on the error that was getting thrown. In each except block, I commented out a different statistic in the dictionary.
Wow, as a fellow data scientist, I am truly amazed by the incredible work you've done! Your expertise in data analysis and modeling is truly inspiring. Your ability to harness the power of data to uncover insights and make informed decisions is truly invaluable. Your work has helped businesses optimize their operations, improve customer experiences, and drive innovation. Thank you for your hard work and dedication in making the world a better place through data-driven insights. Keep up the amazing work!
I haven't found anything better on youtube than your videos for data analysis. Only request I have is for you to make as many projects as you can from easiest to most difficult projects so that we can be thorough in this field. Even if I have to pay for it, I'd be more than happy. BUT , please don't stop here especially for projects...learning languages is slightly different than when we have to put together all of the learned tings in the project
This is impresive and easy to follow,👌🏻 however TH-cam disabled the dislike count( The statistics.dislikeCount property was made private as of December 13, 2021. This means that the property is included in an API response only if the API request was authenticated by the video owner.) and this will affect the function to get video details.
I am happy I struggled over this. I was googling for a Google Apps script and ended in Python. It is a very clear explanation and I am so happy about your English pronounciation. Lot of your country men(or women) have a strong accent i get very very tired of, so I give up or miss too much. So I subscribed to your channel!
For those of you who are seeing this project in 2023, in the function to get video ids remove the dislike code as now youtube api does not give information on dislikes.
A great video which covers all aspects of creating a project in Python for Data Science. Thank you for your service to the community at large. Regards.
Hi Thoufiq, this is very impressive! I’m watching this purely out of curiosity bc I’ve not started my python class yet; however, I would love to see SQL project ideas, maybe for data cleaning and/or analysis. Thanks as always for your clear explanations and guidance 👍🏻 Also very glad to see you’re closing in on 15K, friend!! Congratulations in advance 😀👌🏻🙏🏻
☺️😃 thanks Laura Yeah I’ll make some SQL projects for Data analysis in the near future.. Yeah feels great to see the channel growing 😍 Grateful for all your well wishes 🙏🏼
Hi Thoufiq, this is a very impressive tutorial. I followed this and managed to create my own visualizations for my Master of Arts project, which analyzes several political TH-camrs' video output. Very helpful!
@@techTFQ Hello Thoufiq, I'm trying this exact same thing except I'm using username instead of channel Id, But the response only displays pageInfo : total results: 0 Any idea on what is wrong?
Brilliant tutorial. Appreciated the pace and detail. With this tutorial, I can focus my time on exploring TH-cam data and not worrying about how to get it!
That was wonderfully helpful, Thoufiq. I am a complete novice and while elemets of the coding, such as programs you used, where to find them, how to intergrate are aspects I need to further study, the process you took was clear and inciteful. I paid attention throughout and flatter myself that I saw a few of your return errors before you did 😉 Now to study some more and see where this takes me. Thanks again. David
Thanks, Brother. This was a bit intricate for me as I have just started out learning Python for Data Analysis but the tricks you have used are new and I am eager to learn and use them and create a new project based off of this information. Don't worry, keep at it, you will be bigger than Ken Jee one day, just stay consistent.
Thank you Daksh 🙏🏼 I am glad you found this useful 🙂 And there is no competition with any other TH-camrs, everyone is amazing at what they do .. I chose this example as I felt anyone and everyone could relate to this example and easily understand the concepts.. But thank you for your kind words 🙂
Thank you very much for this tutorial. I am starting my studies in data analytics, and this video has helped me a lot in understanding ETL. After seeing the results, I had a question: is it possible to achieve a similar result by extracting comments from each video?
Hi Thoufiq, excellent video absolutely loved it please keep creating many more project videos. Can you make a short video on how to visualize data using python as Dynamic Radar Charts (i.e Player vs player comparision/company vs company - you can filter which two competitors to compare)
Hello, I'm trying to run your code to get video details from a list of video_ids but I have a SSL error when running video_details=get_video_details(youtube, video_ids) and don't know how to fix it... Error is the following : "SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)" do you know how I can fix this? Thanksssss
I used to be a C and SQL programmer but now I am retired. I want to download all my comments I have made over the years on different TH-cam into a table or database I can store locally. You seem to have done exactly what I need to do. Can I access all the necessary codes that I can just copy and paste? I will be most grateful.
Thank you Brother, Great tutorial, good explanation. it worked for me. can you please make a video on how to extract all the comments, likes and dislikes for each comment, user name, comment date. it will help me a lot. thank you for your great explanation.
@@techTFQ th-cam.com/video/N--0rmo0ctA/w-d-xo.html - an excellent video and code to extract comments - I am still working on my own version but thought you might find this useful. Thank you for all of your excellent content. Just subscribed and well wishes as you approach 100K!
I think your tutorials are amazinggg !! The best data analytics tutorials !! I really like and learn a lot from this tutorial. But I want to work on this code too. The link that you give is not working now. Can you update this link pleeassseee :(((((
i tried extracting video details from channels who have had their likes, dislikes sometimes even commentcount disables so i had to write additional check for that def get_video_details(youtube,video_ids): all_video_stats=[] for i in range(0,len(video_ids),50): request=youtube.videos().list( part='snippet,statistics', id=','.join(video_ids[i:i+50])) response=request.execute() for video in response['items']: video_stats=dict() video_stats['title']=video['snippet']['title'], video_stats['publishDate']=video['snippet']['publishedAt'], expected_check=['viewCount','likeCount','commentCount'] for item in expected_check: if item in video['statistics']: video_stats[item]=video['statistics'][item] else: video_stats[item]=None all_video_stats.append(video_stats) return all_video_stats
Hi Thoufiq, Thanks for sharing this informative & interesting video. I was wondering can we extract the actual comments with replies instead of comment count in this example. Thanks in advance.
great video taufiq. i have one question, I want to browse latest 50 videos from any you tube channel and extract data for same but How can i get link for latest 50 videos only?
I was going through the video that has to do with the youtube API and then I want to take a different way I would like to access the number of videos for each of the TH-camrs and also their videos later on as I go on as you did as well
Great tutorial, thanks Bro. Also would highly appreciate If you can make similar video on "how to grab each viewers Data". I have been looking for extracting periodical data (Day, Week, Month etc) of viewership, subscribers, comments, likes & Dislikes etc of each user, so as to export it to the Google Sheet for rendering the process. Further any other references or sources to this subject referred shall be highly appreciated
Can we also extract random channel names/IDs using python code for the data analysis to know who's at the top in any field? We have to search the channel name to find its id as of now. I had to search google for the top subscribers and then analyzed it. Can't we just randomly sample this whole youtube dataset to get the channel and do the analysis?
It was very useful and easy to understand! Just subscribed. Anyway, I'd like to ask you a question: I have to do a project for my master course, using youtube api, but I need a large amount of datas, basically a lot of channel id of my country (Italy). Is there any method or code that I can use in ordet to fetch all the Ids? Because to me It's impossible to insert them manually one by one. Appreciate any help!
Here's how to get channel ID in 2023:
1. Go to the desired channel and right click on the channel page
2. Go to 'View Page Source'
3. On the source page, top left will have 'Line wrap' with a check box, check that box
4. Press ctrl+F on your keyboard to open search tab
5. Type '?channel_id', it will highlight channel ID for you
6. Copy and use it
O man thanku so mch😊
To those who had problems installing google-api-python-client try these:
To install this package run one of the following:
conda install -c conda-forge google-api-python-client
conda install -c "conda-forge/label/cf201901" google-api-python-client
conda install -c "conda-forge/label/cf202003" google-api-python-client
conda install -c "conda-forge/label/gcc7" google-api-python-client
This is the first video that I've watched on scraping ANYTHING that I was able to follow from beginning to end, understand, and be able to apply to my own channels and project...without running into problems that couldn't be easily fixed! I could fix my own mistakes because you explained each step so thoroughly. Thank you!!
hi i was scrapping vids from pewdiepie,mrbeast channel and i encountered an error i am able to fetch title and published date of all video_ids but in fetching likes it is showing "" 'KeyError' : 'lkeCount "" and same for viewcount, comment count..
Did you face the same issue and if yes how did youresolve it??
@@ashkraze I did run into that! What I did was use a nested try except block. I put the code from this video on creating the dictionary in try, then, under except, I put the same code, but I commented out the line that was giving me the error. Does that make sense? I needed to nest three more blocks depending on the error that was getting thrown. In each except block, I commented out a different statistic in the dictionary.
@@mhapich yes that MAKES SENSE, fixed it and its running absolutely fine, Thanks mate!
I'm having a error (even after closing the execute wit () ). Help plz
@@ashkraze only title,published_at and views work well for me, for like and comment I got keyError
Wow, as a fellow data scientist, I am truly amazed by the incredible work you've done! Your expertise in data analysis and modeling is truly inspiring. Your ability to harness the power of data to uncover insights and make informed decisions is truly invaluable. Your work has helped businesses optimize their operations, improve customer experiences, and drive innovation.
Thank you for your hard work and dedication in making the world a better place through data-driven insights. Keep up the amazing work!
WOWWW
I haven't found anything better on youtube than your videos for data analysis. Only request I have is for you to make as many projects as you can from easiest to most difficult projects so that we can be thorough in this field. Even if I have to pay for it, I'd be more than happy. BUT , please don't stop here especially for projects...learning languages is slightly different than when we have to put together all of the learned tings in the project
Noted and will come up with more projects in the near future
@@techTFQ I'm also waiting bro do more projects bro for beginners it's very helpful
Best tutorial about getting TH-cam data I found here! Your code is cleaner than the one proposed in other tutorials. Thank you!
This is impresive and easy to follow,👌🏻 however TH-cam disabled the dislike count( The statistics.dislikeCount property was made private as of December 13, 2021. This means that the property is included in an API response only if the API request was authenticated by the video owner.) and this will affect the function to get video details.
for a non-tech background like me, your tutorial is super easy to follow.
I am happy I struggled over this. I was googling for a Google Apps script and ended in Python. It is a very clear explanation and I am so happy about your English pronounciation. Lot of your country men(or women) have a strong accent i get very very tired of, so I give up or miss too much. So I subscribed to your channel!
I had to do a project like this for my internship. You are a lifesaver!
did you get internship?
For those of you who are seeing this project in 2023, in the function to get video ids remove the dislike code as now youtube api does not give information on dislikes.
Thanks a loy techTFQ. I was struggling a lot to do the initial steps of this project . Please do lot of videos like this !!!!!!!
A great video which covers all aspects of creating a project in Python for Data Science. Thank you for your service to the community at large. Regards.
Your welcome, glad it helps
Hi Thoufiq, this is very impressive! I’m watching this purely out of curiosity bc I’ve not started my python class yet; however, I would love to see SQL project ideas, maybe for data cleaning and/or analysis. Thanks as always for your clear explanations and guidance 👍🏻 Also very glad to see you’re closing in on 15K, friend!! Congratulations in advance 😀👌🏻🙏🏻
☺️😃 thanks Laura
Yeah I’ll make some SQL projects for Data analysis in the near future..
Yeah feels great to see the channel growing 😍
Grateful for all your well wishes 🙏🏼
Hi Thoufiq, this is a very impressive tutorial. I followed this and managed to create my own visualizations for my Master of Arts project, which analyzes several political TH-camrs' video output. Very helpful!
Thanks and glad it helped:)
@@techTFQ
Hello Thoufiq, I'm trying this exact same thing except I'm using username instead of channel Id,
But the response only displays pageInfo : total results: 0
Any idea on what is wrong?
Fab as always... concise and on fleek. Keep up👌🏻👌🏻🙏
Thank you ❤️😘
I have to say that you are very great...I am following your channel.Your projects are just amazing for getting job.
Brilliant tutorial. Appreciated the pace and detail. With this tutorial, I can focus my time on exploring TH-cam data and not worrying about how to get it!
Assalamualaikum Toufiq ,
It's really a best ever vedio which i look in TH-cam for web scrapping.
Walaikum salaam and thank you 🙏🏼
This was exactly what i was looking for, to the point explanation. Thanx
Thanks a lot for this video!!! 😊😊
Btw liked and ofc already subscribed.
Please upload more videos of projects
Thank you Sultan 🙏🏼
Really happy to know you liked this video.. 🙂
Yeah I plan to upload more project videos..
@@techTFQ thanks a lot brother 😊😊
Your welcome bro 🙏🏼
That was wonderfully helpful, Thoufiq. I am a complete novice and while elemets of the coding, such as programs you used, where to find them, how to intergrate are aspects I need to further study, the process you took was clear and inciteful. I paid attention throughout and flatter myself that I saw a few of your return errors before you did 😉 Now to study some more and see where this takes me. Thanks again. David
One of the best Analysis video I have seen so far
Amazing Content , Expecting videos on some more projects .
Appreciate your hard work !!
Thank you 🙏🏼
Glad you liked it 🙂
I liked the video but from college prospective:
1)how this project will be helpful
2) why should we develop this project
Please answer me....
Practice / learn to use a new tool
I have never seen such a detailed ml video..great
your coding skills are very good
what a brilliant lecture! Really impressed by you sir, thanks for helping out I the journey
Awesome Video! Subscribed because of this! Keep up the good work! Godsent
Was waiting for this😃Thanks a lot brother for this very helpful video👌🏻
Way to go🙌🏻
Thank you hero 🙏🏼
Glad you are finding these videos useful 😍❤️
Wow, I love how you bring it all together. Thank you again.
Thanks, Brother. This was a bit intricate for me as I have just started out learning Python for Data Analysis but the tricks you have used are new and I am eager to learn and use them and create a new project based off of this information. Don't worry, keep at it, you will be bigger than Ken Jee one day, just stay consistent.
Thank you Daksh 🙏🏼
I am glad you found this useful 🙂
And there is no competition with any other TH-camrs, everyone is amazing at what they do ..
I chose this example as I felt anyone and everyone could relate to this example and easily understand the concepts..
But thank you for your kind words 🙂
Thank you for putting this together! It was super helpful for me
Really interested in this stuff and fabulous explanation ...Also please do videos on Data science how to begin from scratch ......🙌🙌
Thank you Kancherla 🙏🏼
Glad you liked it..
Yes will cover videos on data science soon..
30:52 well, now you have 215K subscribers xD Congrats on that, and thanks for the video....!
thank you so much for this ! it was super easy to follow along you are a great teacher!
Thank you very much 🙏🏼
Glad it helped
Thanks for creating this project. I watched it like an action movie :) and going to learn bit by bit again by creating the same project again.
Thank you Thoufiq, this is a great project.
Glad you like it
Thanks a lot techTFQ! It's a great project indeed.
Thank you :)
I'm only 25 minutes in and I've learned sooooooooo much already!! Thank you :)
Nicely explained each and every detail thank you so much
good work taufiq thanks for sharing
Your welcome Imran
Glad you liked it
project is done...........thank you
cool 🙏
HI,
ModuleNotFoundError: No module named 'googleapiclient' I am geting this error can you help me?
Thankyou so much for this wonderful tutorial and from my anlysis you posted most video on Jan and feb :-p
Haha that’s pretty right 👍
Sir waiting for SQL project
One more question do we need to create another API key for another youtuber analysis?
this is such a good practice project. definitely going on my github.
Brother what a nice video, thanks for the time and sharing!
You are so brilliant 🥳🥳🥳🙏🙏💐
Thank you Kamal 🙏🏼
Glad you liked it 🙂
Thank you Thoufiq for this incredible video
Excellent work and great explanation sir.. waiting for more of challenging videos
Thank you 🙏🏼
Glad you liked it …
Great video. Looking for more like this.
Absolutely amazing video!
OMG, this is awesome, thanks a lot!👏👏👏👏👏
You are a great teacher!
Nice content brother, you help me a lot, i really appreciate your efforts
Hi, great tutorial! Congratulations for your work! It really helped me a lot to know how to work with TH-cam API.
I am glad to read this Filipe 🙏🏼
great vid, you saved my proyect
Hello. i want to ask, how to receive video data (mp4) from youtube?
Thanks for valuable information
Glad you liked it
Love this easy to follow 👍🏻👍🏻
Now the youtube Channel ID cannot be extracted from the process you mentioned. Please let me know the alternate.
I am facing the same issues.
Hey most of usefull tutorial,
Please say how to input youtube channel ids in google sheet.
Thank you soo much sir again ,
Great Tutorial! Thanks a lot!
Clear explanation ❤
Thank you so much for this stuff.
Thank you very much for this tutorial. I am starting my studies in data analytics, and this video has helped me a lot in understanding ETL. After seeing the results, I had a question: is it possible to achieve a similar result by extracting comments from each video?
Hi Thoufiq, excellent video absolutely loved it please keep creating many more project videos. Can you make a short video on how to visualize data using python as Dynamic Radar Charts (i.e Player vs player comparision/company vs company - you can filter which two competitors to compare)
Thank you Abhishek 🙏🏼
I’ll consider your suggestion for a future video
It was the best video on this topic... I have a question can you please tell me how to use filter on tags while retrieving videos data
Tnq .its usefull for me
Great class!
Thank you Adriana 🙏🏼
Glad this helped ..
Hello, I'm trying to run your code to get video details from a list of video_ids but I have a SSL error when running video_details=get_video_details(youtube, video_ids) and don't know how to fix it... Error is the following : "SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1129)" do you know how I can fix this? Thanksssss
Very useful ! Thank u
Your welcome 🙏🏼
I used to be a C and SQL programmer but now I am retired.
I want to download all my comments I have made over the years on different TH-cam into a table or database I can store locally.
You seem to have done exactly what I need to do.
Can I access all the necessary codes that I can just copy and paste?
I will be most grateful.
Thank you for this video
Thank you Brother, Great tutorial, good explanation. it worked for me. can you please make a video on how to extract all the comments, likes and dislikes for each comment, user name, comment date. it will help me a lot. thank you for your great explanation.
Your welcome buddy. glad you liked it.
and noted on the suggestion, will do it
@@techTFQ th-cam.com/video/N--0rmo0ctA/w-d-xo.html - an excellent video and code to extract comments - I am still working on my own version but thought you might find this useful. Thank you for all of your excellent content. Just subscribed and well wishes as you approach 100K!
Wow. Amazing
Glad you liked it ☺️
the install for the google api package has changged to " conda install conda-forge::google-api-python-client "
Thank you!
Thanks!
Amazing video.. thank you so much.
I would like to know how to get video details of multiple channels at a time. Can you please suggest how to do it.
Thank you, very awesome tutorial 🔥😎
sir extremly great tutorial just one question how do we use this in django and make our own videostreming website
I think your tutorials are amazinggg !! The best data analytics tutorials !! I really like and learn a lot from this tutorial. But I want to work on this code too. The link that you give is not working now. Can you update this link pleeassseee :(((((
super duper boss
Thank you
Great video! One thing? Can you write this project in another editor. Pycharm?
i tried extracting video details from channels who have had their likes, dislikes sometimes even commentcount disables so i had to write additional check for that
def get_video_details(youtube,video_ids):
all_video_stats=[]
for i in range(0,len(video_ids),50):
request=youtube.videos().list(
part='snippet,statistics',
id=','.join(video_ids[i:i+50]))
response=request.execute()
for video in response['items']:
video_stats=dict()
video_stats['title']=video['snippet']['title'],
video_stats['publishDate']=video['snippet']['publishedAt'],
expected_check=['viewCount','likeCount','commentCount']
for item in expected_check:
if item in video['statistics']:
video_stats[item]=video['statistics'][item]
else:
video_stats[item]=None
all_video_stats.append(video_stats)
return all_video_stats
Thank you!
thank you
Your welcome
Thanks
Thanks Mayank! Very kind of you 🙏
Amazing!
Thanks a lot❤
I am stuck.. I wanted to do a live view counter display but the viewCount does not return live data. Is there anyway to do this? Please help
I followed step by step instructions , but found 'pageInfo': {'totalResults': 0, 'resultsPerPage': 5}}.How to fix it?
great video....just a small doubt...can we present this into Excel using CSV module?
thank you for this
Hi Thoufiq, Thanks for sharing this informative & interesting video. I was wondering can we extract the actual comments with replies instead of comment count in this example. Thanks in advance.
I think we can do it but I haven’t tried yet
great video taufiq. i have one question, I want to browse latest 50 videos from any you tube channel and extract data for same but How can i get link for latest 50 videos only?
I was going through the video that has to do with the youtube API
and then I want to take a different way
I would like to access the number of videos for each of the TH-camrs and also their videos later on as I go on as you did as well
Hey people i have an issue installing environment can someone help me fixit
Great tutorial, thanks Bro. Also would highly appreciate If you can make similar video on "how to grab each viewers Data". I have been looking for extracting periodical data (Day, Week, Month etc) of viewership, subscribers, comments, likes & Dislikes etc of each user, so as to export it to the Google Sheet for rendering the process. Further any other references or sources to this subject referred shall be highly appreciated
Can we also extract random channel names/IDs using python code for the data analysis to know who's at the top in any field?
We have to search the channel name to find its id as of now. I had to search google for the top subscribers and then analyzed it. Can't we just randomly sample this whole youtube dataset to get the channel and do the analysis?
Hey taufiq, how to prepare/ask these questions while practicing SQL with datasets? Elaborate in detail in upcoming videos.
Sure ritesh .. noted
It was very useful and easy to understand! Just subscribed. Anyway, I'd like to ask you a question: I have to do a project for my master course, using youtube api, but I need a large amount of datas, basically a lot of channel id of my country (Italy). Is there any method or code that I can use in ordet to fetch all the Ids? Because to me It's impossible to insert them manually one by one. Appreciate any help!