Skip to content

Instantly share code, notes, and snippets.

@alirobe
Created October 18, 2025 00:19
Show Gist options
  • Select an option

  • Save alirobe/4093d7b11b84de9771c1874e6fb5bea6 to your computer and use it in GitHub Desktop.

Select an option

Save alirobe/4093d7b11b84de9771c1874e6fb5bea6 to your computer and use it in GitHub Desktop.

Revisions

  1. alirobe created this gist Oct 18, 2025.
    17 changes: 17 additions & 0 deletions channel-list.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    // goto https://www.youtube.com/feed/channels
    // set to a-z and scroll all the way down until loading ends
    // run in terminal:
    arr = Array.from(document.querySelectorAll('ytd-channel-renderer'))
    data = []
    arr.forEach((item, index) => {
    data.push({
    title: item.querySelector('.ytd-channel-name').innerText,
    handle: item.querySelector('yt-formatted-string#subscribers').innerText,
    subs: item.querySelector('#video-count').innerText,
    description: item.querySelector('#description').innerText,
    link: 'https://youtube.com' + item.querySelector('a#main-link').href
    })
    })
    console.log(data)

    // side-note: why are YouTube using IDs? I thought that was inefficient...