I am a software engineer by profession, and I mostly work with Python only. I am very comfortable using Django for backend APIs and database designs. However, I always felt a little nervous about frontend development, especially JavaScript. I felt, JavaScript is a bit confusing always.
The Reason I Started
To gain knowledge and get comfortable with the frontend, I decided to learn JavaScript properly. I heard many people recommending Akshay Saini and his "Namaste Javascript" playlist on YouTube, so I thought to give it a try.
Namaste Javascript series has 2 playlists and it is one of the best playlists to learn JavaScript. I would recommend you to watch this playlist if you want to gain deep knowledge on JavaScript.
- Season 1: Covers the basic & essential topics
- Season 2: Checkout for advanced concepts
I started watching the videos one by one in Season 1 playlist. The content was very good and easy to understand, and I wanted to finish the whole playlist. To plan my schedule, I wanted to know the total duration of the playlist. But, YouTube doesn't provide a way to get the total duration of a playlist (but this feature is available in YouTube Music playlist).
The Problem with Existing Tools
I searched on Google for "YouTube Playlist length." I found a few websites that showed the total time and speed calculations. However, I realized these tools were missing some practical features I really needed:
- Remaining Time: After watching 10 videos, I wanted to know how much time is left for the remaining ones. Also, the last few videos in the playlist are usually the general ones, so I wanted to skip them. Existing tools only showed the total time but I wanted to know the time for a specific range of videos.
- Sorting: I wanted to sort videos to watch the shortest ones first or the most popular ones. There was no option for this.
- Access to videos: Once I sorted the playlist, I want to open the videos directly from the website because I don't want to search for the videos again in YouTube. There was no option for this.
- Video Stats: I wanted to see the stats of the videos like likes count, views count and comments count along with the thumbnail, so that I get a rough idea about the video. There was no option for this as well.
Building My Own Solution
Since I am a developer, I decided to build a tool that solves these problems. I paused my learning and opened my code editor. I used Django because I know it well and can build backend logic fast.
I made a list of features that I included in this tool:
- Total Duration: The basic length of the playlist.
- Average Duration: The average length video in the playlist.
- Speed Options: Time calculation for 1.25×, 1.5×, and 2× speeds.
- Remaining Duration: You can select the videos you have watched, and it tells you the time left.
- Advanced Sorting: Options to sort by Longest First, Shortest First, Most Liked, Most Viewed, Oldest First and Newest First.
- Direct Links: You can open the video directly from the table.
- Stats: You can also see the stats of the videos like likes count, views count and comments count.
Once I defined the features, I started building the tool. I used Django for the backend and wrote CSS & HTML with the help of AI. For the data, I have used official YouTube API. If you want to know how to setup and create a YouTube API key, check this video.
Note on API Limits: YouTube provides a free daily quota of 10,000 "units". A unit is a measure of resource usage (e.g., retrieving a playlist costs 1 unit, getting information about 50 videos costs 1 unit, etc), so this generous limit is more than enough for hobby projects. Here is the link to the official documentation page.
Conclusion
It took some effort, but I managed to build the tool exactly how I wanted it. Here is the link to the tool: YTP Length. From then, I'm using this free tool whenever I learn something from a YouTube playlist. It's been used by many people now and I'm getting feedback that it's very useful to them.
Note: If you want to know my learning strategy, then check out this blog post: How I Use YouTube Playlists to Learn Fast: My 3 Secret Steps.