Skip to content

Instantly share code, notes, and snippets.

@xMajedz
Last active January 6, 2019 13:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xMajedz/911fd0b2ca6e40963948ab8b3bd179d3 to your computer and use it in GitHub Desktop.
Save xMajedz/911fd0b2ca6e40963948ab8b3bd179d3 to your computer and use it in GitHub Desktop.
if(window.top.ytInitialData.contents.twoColumnWatchNextResults != undefined)
{
var a = 0, b = window.top.ytInitialData.contents.twoColumnWatchNextResults.playlist.playlist.contents.length;for(i = 0;i < b;i++){var c = window.top.ytInitialData.contents.twoColumnWatchNextResults.playlist.playlist.contents[a].playlistPanelVideoRenderer.lengthText.simpleText;console.log(c);a = a + 1;}
}
else if (window.top.ytInitialData.contents.twoColumnBrowseResultsRenderer != undefined)
{
var a = 0, b = window.top.ytInitialData.contents.twoColumnBrowseResultsRenderer.tabs[0].tabRenderer.content.sectionListRenderer.contents[0].itemSectionRenderer.contents[0].playlistVideoListRenderer.contents.length;for(i = 0;i < b; i++){var c = window.top.ytInitialData.contents.twoColumnBrowseResultsRenderer.tabs[0].tabRenderer.content.sectionListRenderer.contents[0].itemSectionRenderer.contents[0].playlistVideoListRenderer.contents[a].playlistVideoRenderer.lengthText.simpleText;console.log(c);a = a + 1;}
}
@xMajedz
Copy link
Author

xMajedz commented Jan 3, 2019

this is the ugliest thing i wrote so far

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment