Skip to content

A Tampermonkey (and other *monkey) script to extract YT ID(s) from most YT pages with a single click

License

Notifications You must be signed in to change notification settings

NebularNerd/YT-URL-Extractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YT-URL-Extractor

A Tampermonkey (and other *monkey) script to extract YT ID(s) from most YT pages with a single click

What is this thing?

I wanted an easy one click solution to grab every YouTube ID from a page, then give me a neat list without duplicates ready for use elsewhere. I also fancied brushing up on my Tampermonkey/Javascript skills so though I would give it a go. I set to work throwing a solution together and ended up with this, it's a fairly neat solution that adds a discrete 📋 button at the top of most pages, clicking it will either copy the current URL if you are watching a video or short, or on a playlist style page you'll get every a list of every URL on the page.

Features

  • Quick and easy to use
  • Should work with most *monkey variants: Tested/Developed with Chrome Tampermonkey v4.18.1, Also tested on Firefox Greasemonkey 4.11 (from 2021)
  • Auto updates if your *monkey variant supports it

Sounds great, how do I use it?

  • The easiest way to install this is to click this link:
    💾 YT-URL-Extractor.user.js
    most *monkey's auto install features will then take care of things, this also can be used to manually trigger an update.
  • OR, view the YT-URL-Extractor.user.js and then click the RAW button, if you wish to check out the code first.
  • OR, Download or Copy/Paste the YT-URL-Extractor.user.js into your *monkey, save and activate.

Next time you vist a supported page (you may need to refresh if you are already on a YT page) you will see a small clipboard icon 📋 next to the mic icon at the top of the page.

Playlist page

Give that a click and a banner will briefly flash to let you know it's done it job.

Banner flash

Paste your output wherever you need it, depending on the page there will be two outcomes:

Limitations

If you are on a channels homepage and they have some sort of carousel/spinner thing, you'll only get the ID's for the items you can see, the others are not generated/rendered until you bring them into view. I decided to leave it there after coding it but it's not much use on that page.

To-do

  • Code optimisation: Code is fast enough but I'm sure there are a couple of things that could be better
  • Add clipboard button to individual videos links, quickly grab individual URLs as well as whole page
  • Add auto update

License

Published under the The Unlicense

Help fuel my caffine habbit

If you fancy buying me a ☕ to say thanks, please visit my Ko-Fi page by hitting the button below.