The Dislike Count Code is COMPLETE!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
last month when youtube announced they're gonna remove the dislike count from all videos across its entire platform i thought it was a pretty bad idea so i went ahead and wrote a program that would pull my dislike data put it in a comment and post that comment under that particular video if you're subscribed to the channel you've already seen that video if you aren't then consider subscribing i made a video going over how that code works and whatnot a few bugs a few issues and a few things that i didn't have time to do since i just threw this together in a single day but obviously i want this to actually become something that other people can use as well as i can consistently use so in this video well i've already done it i have fixed all those bugs completed all the issues that i can for now gone through a few of the pull requests and completed this program as far as this video is concerned there's always room for improvement always room to do more but i also have an alternate idea that may work a little bit better it just requires more work from the viewers of any particular creator but it would be easier for the creator to use the alternative which if i can get done over the next month it's a little bit more involved plus i have other obligations to do prior to this if i can get it done over the next month then you'll see that video and that program be available in january of 2022 but for now let's get this program that i created to put the dislike count back on my channel actually operational and address some of the concerns that y'all had and if you're wondering why i didn't record the entire coding process that is because i record in this office and i did not code this program or at least this rendition of it in this office i was actually using this this is a brand new 17-inch lg gram and since they are sponsoring this video and sent me this laptop i wanted to test it out encoding this program on the laptop here there i just got back from new york city well that well that was my trial run and since you're seeing this part of the video that means that i liked it and let me tell you why i liked it and how i used it to see if this laptop is a good fit for you now i know a lot of you are computer science students and i actually recommended last year's lg gram to computer science students because it does everything that you need to do and it is incredibly portable taking it from class to class and those are still my two main priorities when it comes to a laptop but for different reasons i'm going to be talking about the new lg gram from the perspective of how i currently use it and that is to run this youtube channel so i do a lot of web browsing gmail google drive google sheets google docs researching on coding projects pulling up youtube because i procrastinate all the time and of course a lot of coding a lot of adobe creative cloud with lightroom photoshop and a little bit of video editing and let me say whether you're a computer science student or you're running a startup business whatever it may be the lg gram is a very good choice for a lot of different people the reason i like it brings me back to exactly what i look for in a laptop and based on everything i mentioned previously it does all of that with one small exception while it does everything i need to do when i do heavy video editing it does run a little bit hot so i wish the cooling system was a little bit better but it still does it all and it's incredibly portable now you may be thinking it's a 17-inch laptop how portable can it be well it's just as portable as this little 13-inch laptop at least for me because while these are very similar in weight they're also the lightest laptops out of all the other laptops that i've ever used they both fit in my bag just fine so if they're both light and they both fit in my bag just fine i'm not going to notice whether it's a 13 inch laptop or 17 inch laptop until i go to open it up and then i'll be happy that i had the 17 inch laptop because i have more screen real estate oh and i tested out the battery because that's a big thing for me as well so i don't have to always find an outlet to plug in the laptop and i tested it for everything i mentioned previously aside from the video editing because i wasn't sure if that was fair and it lasted me roughly 10 hours which i was actually very happy with and i think if you're in the market for a new laptop definitely consider the lg gram if you want to check out all the spec options the sizes maybe the new 16-inch lg gram i'll leave links in the top of the description i appreciate the support so obviously the very first thing that i need to address is what i mentioned previously and that is the fact that it's overriding not only the automated comment but every other comment made by me and that is an error on my part not a bug in the code because that has everything to do with my search terms so this is how that comment that it wants to update is located if it already exists and if i just put very simple search terms then it may go through all of the comments that may match those search terms instead i had to make sure that the search terms are rather specific for the automated comments so it would only work on the automated comment and only that particular automated comment when it's done by me so that is fixed but it will change from person to person if you change the original text and the next issue is this one right here is another one that i did not find it is for a video with zero likes and dislikes so the script will give a zero division error need to write a test case for that so i didn't find because as i mentioned i didn't write any tests for this little program but also i didn't have any videos with zero likes and zero dislikes because i guess there are people that love me and hate me so i didn't run into this problem when actually running the code and that was actually fixed in a pull request right here so previously the code looked like this let me move this over a little bit so you can better see it in order to get the ratio we would do likes divided by the total amount of likes plus dislikes and then multiply it by 100 to get our percentage however if this right here equals zero well zero division error you can't divide by zero that's okay so that is where the if statement comes in handy so if likes and dislikes equal zero then make the ratio zero otherwise do the math that i implemented before i am happy with this solution there i'm sure there are other ways to go about it that may be different or some people may think better but this works so now we have fixed the two main bugs if you will where it would overwrite comments that was never intended to be overwritten and the actual bug where you would be met with an error if the likes or disliked dislikes equaled zero there's also another issue i only ran this on five videos at a time and that is because as you can see down here the results per page is only five that is the default however we can change that default override it by putting in the max results and we can put in 50 right here as you can see we have max results 50 hit enter and now the results per page are 50. however the total results are 243. now you'd say okay we'll just make this something more than 243 so 250 however the maximum results per page is still 50. so it doesn't matter if we put in 250 or a thousand or a million we can only have 50 so let's just keep it at that the way that we get to the rest so the remaining 193 results which the results are videos i've uploaded 243 videos that this is pulling in the way to do that is by the next page token right here and this is how i implemented that so i put the entire for loop in a while loop so while we have videos it does all of this for each individual video and that is exactly what the program does it pulls the dislikes and likes and all of this data right here it puts it all into a comment and then it creates a new comment or edits a comment if that comment already exists however once it's done with those 50 it hops out of the for loop that's the end of the for loop right here and it tries if there's a next page token then implement that next page token and get the next 50 results again this could be 50. i should just change that here yep there we go else break so it'll continually go through here as long as there is a next page token which there will be a next page token as long as there is a next page meaning results on the next page so it should run through every single video and make a comment with all the data on every single video and update that video or that comment every single day which brings us to the next part the cron job which is just like a little script that runs this program every single day which i actually haven't done just yet but i'll get around to it i don't know if i'm going to do it this video though kind of kind of feeling a little bit lazy today i just kind of want to finish the video i mean i'll tell you how it is that's just that that's just how i am whatever but here's a look at that code running because i actually ran it yes actually i can run it today let me just run it right now so we can see how it goes because i ran into an issue yesterday which doesn't make really any sense all right but now we are on a brand new day we have entirely reset quota because it resets every single day i have 10 000 and i'm actually not even sure what one particular video how many how much of the quote it takes up but we're gonna see what we can do today all right the moment of truth let's uh let's see if this works this is going to take a while so just a quick look while that is doing each and every individual video until the quota runs out or the code breaks as you can see i ran this yesterday so this is as far as it got the my process of completing a software engineering task and it was last updated on december 7th just like every single other comment in here because again it did all of this yesterday so as long as it gets to at least this point we should see new comments but also when we come to this comment it should be slightly updated in terms of the values as well as last updated on december 8th so it should work so it looks like we may have hit the same wall as last time because this is the same error that i got it had to do with the video id as if there was no new video id to work with so i haven't done too much research on this but if we come over here and we refresh we didn't get any new videos but as you can see it was updated today just now so if any of you have any idea as to why it is only doing 109 videos or if it's stopping at whenever i uploaded this video maybe it's a date thing i'm not sure maybe they'd so where are we at i uploaded this video can i see when i uploaded this video yeah yeah i'm an idiot march 8th 2019. so did something happen just before march 8th where it would mess up the api and retrieving the video id or is there another issue if anyone knows i'd appreciate it oh and if anyone wants to get a 20 credit you know go to lynnode.com but that's how it works and it'll also be interesting to see once i upload another video if it'll stay at 109 meaning it will not update this comment but it will update this comment or if it'll update 110 videos you know the current 109 plus the new one and that would tell me that there is an issue with the youtube api and gathering the video id prior to what date was that march 8th 2018 19 i already forgot but prior to that video which will be kind of interesting but moving on from that so it does the job i just need to automate it which whatever okay i'll automate it i did the next page token i did the zero div error i did the search terms the prs improve readability and testability of the code joey actually did a lot a lot of good stuff my only gripe with it and i say that loosely i'll read my comment right here a lot of this is very helpful i haven't gone through all of it but i will the only issue is i see with it geez can i form a sentence the only issue i see with it is that it's quite a bit different from the youtube data api documentation code which may be better but it could cause some trouble in the future for others trying to understand the code and i just said let me thank think on this a bit longer and he said good point i can isolate some of the youtube boilerplate code better and remove some of my changes to that specific part later some of this is good i'll have to see some of the changes i haven't done that just yet but all of that is on my to-do list and this is style improvements pythonic code as well that is like the main change so converted camel case to snake case since that's the recommended naming convention for python update message body content to be easier to edit i believe the previous pull request does this as well and then the add time to date so there are two issues with this one is i'm not sure that's necessary if i update it once a day doesn't necessarily matter when it's updated the only time this would come in handy is if i implemented something for new uploads so those new uploads would get updated every five minutes for the first couple hours and then every hour for the next 24 hours or something like that so you could see an active climb and views to dislikes instead of waiting an entire day on a new upload which would be more helpful but if i do it once a day on all my other videos i don't think it matters that much because all my other videos aren't going to change so drastically so it doesn't matter if it was done at 8am eastern time or 8 p.m eastern time you see what i mean let me know if you agree or if you have any other thoughts or concerns on that but i think what i say makes a little bit of sense and also this is another problem with the formatting of the time is that it creates a time stamp and i don't want to create a timestamp i want to create a time and that's a time stamp for the video so if you click on that it'll take you to is this hours this minutes this seconds it'll take you to 35 minutes into the video which the vast majority of my videos will just take you right to the end and you'll skip it and you won't watch it and then i'll be sad so i don't want to do that so i think that's about it the only other issue is the fact that i can't pin the comments however i do have a potential solution to this that is at least for future videos so every single time i upload a video i go through getting the thumbnail doing the description doing the keyword search putting in any any links to videos and doing the end screen and monetization and stuff like that part of my process could also be adding a comment that fits the same boilerplate as the comment that you see here the the automated comment and then pin that comment so i pin that comment and wait about 10 20 30 minutes to update that comment but as it is pinned i will depend on y'all to thumbs up the comment so that way when it gets updated it gets unpinned but it has so many thumbs up from y'all that it'll stay at the top of the comment section and that's really the only solution that i see working in this situation y'all suggested a few things and that is put the dislike count in the description or put the dislike account in the title the issue with that is that it re-indexes the video every single time you edit the title and description and i'm not sure how that works with seo and and whatnot but also i'm a bit more nervous about changing the title for all of my videos or editing the description for every single one of my videos oppo as opposed to just you know messing with a comment because it's a little bit easier that way and as far as the program is concerned right now that's about it there are two other things that i would like to address that are in the overall realm of this and the first one i know a lot of y'all probably already commented this has to do with the extension return dislike count or something like that it is a rather popular extension and i don't say what i'm about to say to you know i love my fellow developer they were pretty quick in putting this out i think they put it out a couple days after i put this program out but it's an extension that returns a dislike count for now if you have seen my community post the same day i uploaded this video and that is the fact that youtube is removing your ability to get disliked data via the youtube data api now there's a few caveats here my program will still work because i am giving authorization to my api to get my dislike data but if i were to try to get any other channels dislike data i can't do it without their authorization and that is the problem with this extension and they even acknowledge that in their own github repo the fact that the dislike field on the youtube api will be removed on december 13th so the way this extension will work after december 13th is our backend will switch to using a combination of scraped dislike stats estimates extrapolated from extension user data and estimates based on view like ratios so basically every video dislike data that has been scraped prior to december 13th will be stored then they will basically take that information and try to again extrapolate basically do a little bit of math here and there and basically guesstimate the like to dislike ratio it may be fairly accurate but it's not going to be exact and sometimes it may not even be accurate we have yet to see that i hope they can find a way around this obviously this is completely out of their control this has everything to do with youtube in their attempt to remove the dislike count from their entire platform but i just wanted to let you know that if you do use this particular extension because i know there are a lot of people say give up on your program there's already extension for it it's not going to work exactly the way you think it's working and then the other thing i want to talk about is the fact that youtube is they're not really covering their tracks too well so you know how they said they removed the dislike count for the well-being of creators well as a creator i never go to the actual video to view my dislike account or to view comments or anything i use youtube studio and this right here is youtube studio it actually takes you to the dashboard but that has a lot of different analytics that are beyond the scope of what we're talking about right now but this is where i can come to my comments this is every comment left on my channel for any particular video as you can see you can also go to monetization any copyright claims you have analytics playlists and content this is one of the main tabs and as you see you can view all of your videos here public monetization all this other information which you may have already seen likes and dislikes this is literally where i check as a creator the like to dislike ratio on a given video so before they actually implemented the removal of the dislike count i figured that along with it they were going to remove it from here as well because there's a way to drill into the analytics on a video and pull up the dislike count and the whole point in that would be to not unintentionally view your like dislike count and the only way you could view it is if you intentionally drilled in and found that information so if they were actually worried about the well-being of creators don't you think they would remove it from the main place for which creators look at that information and even if they're not searching for the information they can easily unintentionally view it i mean we all knew that youtube wasn't removing the dislike count for the well-being of creators they did it because well i think we all have a decent idea of why they did it but since they decided to sell it as they're doing this for the well-being of creators you'd think they'd try a little bit harder to convince us of that angle but uh that's nearly there i just thought that was a funny a funny thing and i wanted to mention it i hope you enjoyed this video like it if you did subscribe if you want more content like this i have a lot more coding projects on the horizon and if you aren't subscribed already hit the bell so you're notified when i do upload i don't upload that often so you're not going to get spammed by my uploads and um i think that's all i have to say on this matter don't forget to support the sponsor of this video lg graham the link will be in the top of the description if you want to check out the specs check out the other versions of the new lg gram it's kind of funny because i actually received an lg gram last year and then earlier this year i got an intel evo series laptop and then now i get the intel evo series lg gram it's kind of funny how that works out but um i just figured i'd mention that hope you all have a good day good week i'll see you on the next video
Info
Channel: ForrestKnight
Views: 5,566
Rating: undefined out of 5
Keywords: youtube dislikes, code, programming, dislike count, youtube is removing the dislike count, software development, python, coding
Id: rUnM772kZWM
Channel Id: undefined
Length: 20min 17sec (1217 seconds)
Published: Thu Dec 16 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.