Last active
March 23, 2024 20:28
Revisions
-
coderobe revised this gist
Mar 23, 2024 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,4 +5,6 @@ ytInitialData[b="contents"]["twoColumnBrowseResults"+(i="Renderer")] .tabs[0]["tab"+i] .content["sectionList"+i][b][0]["itemSection"+i][b][0][(g="playlistVideo")+"List"+i][b] .reduce((N,y,_,a)=>a[(z=y[g+i]).videoId]??=N+=+z.lengthSeconds,0) // authors: coderobe, ilbelkyr -
coderobe revised this gist
Mar 23, 2024 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,4 +2,7 @@ // run. doesn't work? that means the playlist is truncated. scroll all the way down and try again. // output is in seconds. divide by 3600 for fractional hours. ytInitialData[b="contents"]["twoColumnBrowseResults"+(i="Renderer")] .tabs[0]["tab"+i] .content["sectionList"+i][b][0]["itemSection"+i][b][0][(g="playlistVideo")+"List"+i][b] .reduce((N,y,_,a)=>a[(z=y[g+i]).videoId]??=N+=+z.lengthSeconds,0) -
coderobe created this gist
Mar 23, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ // open a playlist, or Watch Later (https://www.youtube.com/playlist?list=WL) // run. doesn't work? that means the playlist is truncated. scroll all the way down and try again. // output is in seconds. divide by 3600 for fractional hours. ytInitialData[b="contents"]["twoColumnBrowseResults"+(i="Renderer")].tabs[0]["tab"+i].content["sectionList"+i][b][0]["itemSection"+i][b][0][(g="playlistVideo")+"List"+i][b].reduce((N,y,_,a)=>a[(z=y[g+i]).videoId]??=N+=+z.lengthSeconds,0)