Fever Posted April 19, 2013 Share Posted April 19, 2013 There are many different YouTube URL formats and they often include information about playlists, referrers, etc. A few examples: http://www.youtube.com/embed/T6DJcgm3wNY?rel=0 http://m.youtube.com/#/watch?v=T6DJcgm3wNY&feature=player_embedded&desktop_uri=%2Fwatch%3Fv%3DT6DJcgm3wNY%26feature%3Dplayer_embedded However, when I want to share a YouTube URL with someone I only want the basic URL that points directly to the video. In this case: Here's a workflow that takes any* YouTube URL and copies the basic URL to the clipboard. Download: basic-youtube-url.alfredworkflow * It might not cover every possible URL format, but so far I haven’t come across one that doesn’t work. Link to comment
vitor Posted April 19, 2013 Share Posted April 19, 2013 I was going to suggest it returned the short URL, but since you’re manipulating the string, and not using the API, that would take some work. I would suggest however, that instead of having the user post the URL into Alfred, you’d just get it from the clipboard via pbpaste (you’re already using pbcopy anyway, so why not). Link to comment
Fever Posted April 20, 2013 Author Share Posted April 20, 2013 I would suggest however, that instead of having the user post the URL into Alfred, you’d just get it from the clipboard via pbpaste (you’re already using pbcopy anyway, so why not). Thanks, great idea! I updated the workflow. Link to comment
tschoof Posted April 28, 2013 Share Posted April 28, 2013 Thanks, great idea! I updated the workflow. Maybe it's just me, but what about an option that takes the URL from the current safari tab? Link to comment
vitor Posted April 29, 2013 Share Posted April 29, 2013 Maybe it's just me, but what about an option that takes the URL from the current safari tab? That’s a pain to support. To implement it on one browser, you should support others, and then you have to add a configuration option to let the person pick the browser, or do some applescript to detect which browser is the frontmost window. I’ve implemented that in PinAdd, and I can tell you that for such a simple workflow, more than two thirds of your code would be just for the browser support. If you feel like it, though, I’ve put together a small list of how to do it for some of them. Link to comment
pmontp19 Posted January 21, 2014 Share Posted January 21, 2014 Your download link is broken! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now