When you copy the URL for sharing in YouTube, it adds a query parameter now, so=blah, for tracking the source. This removes that. It could of course be smarter and stop at either the end or the next parameter, but since I haven’t seen any extras, I just remove everything after.
Get YouTube share URL sans tracking query param
https://www.icloud.com/shortcuts/51caa80475614a61a3c31764ba2f2f99
4 Comments
stoy@lemmy.zip · 1 pts · 2y
Or, you could just remove the "si" parameter from the link manually....
theherk@lemmy.world · 2 pts · 2y
Yes, there are many things one could do manually that could otherwise be done with automation, but here we are… in an automation community.
stoy@lemmy.zip · 2 pts · 2y
Thats fair, I didn't realize that as I was reading all.
brbposting@sh.itjust.works · 1 pts · 2y
This is great, thanks! I was about to build one of these. Now I’ll have to make a more complex one :-)
Ideas for my more complex version:
Use case:
Someone posts a YouTube URL and a YouTube shorts URL in a Lemmy comment, both with the tracking parameter. I copy the comment to clipboard and run the shortcut. My clipboard is populated with a clean YouTube URL, the second clean YouTube URL (instead of the initial shorts syntax), and a piped.video mirror of each link. It may prepend a comment like “Hey, Google snuck some trackers onto your links, so I used a little script on my phone to remove them for us:”
::: spoiler Tap to see the instructions a language model couldn’t follow when I tried the other day :) Create an iOS shortcut that performs the following actions:
example URL 1orexample URL 2.Example identifier one.Example output URL 1andExample output URL 2.Example URL 1:
Example URL 2:
Example identifier 1:
Example output URL 1:
Example output URL 2:
At the end of the day, the shortcut must be able to automatically identify and subsequently handle either one regular YouTube URL or one YouTube shorts URL at a time. It must be able to strip the unique identifier found at the end of the provided URL. It must return a regular YouTube URL and a Piped mirror. :::