Python script to find the total duration of a YouTube playlist and other related information from its URL
Run the script with the URL of the YouTube playlist as the first argument
$ python3 script.py <playlist url>
Enter the following code in your terminal
$ python3 script.py https://www.youtube.com/playlist?list=PLJ8cMiYb3G5eLwIHwp0NAPJaLSo9qNexm
Output:
Playlist: Vox Borders: India
Channel: Vox
No. of videos: 5
Total playlist duration: 0:49:47
Average video duration: 0:09:57
19,779 views