Jump to content

Copy Title & Link of YouTube Video.


Recommended Posts

I take notes on apple notes when I watch youtube tutorials so I can create a searchable database & so I can better learn what I am trying to do. Every time I watch one of these videos I copy the title & link of the video and make that the title of the note so I can easily find the video again. I think making a workflow to do this would be possible. Does anyone know of anything that would do this?

Edit: I only want the Title + URL of video to be put on the clipboard, it doesn't have to paste it into notes for me.

Edited by Undertaker01
Link to comment

To accomplish this, I built an Automator Service, which consist of only one Applescript:

 

on run {input, parameters}

(* Your script goes here *)
set htmlout to ""
tell application "Safari"
repeat with t in tabs of window 1
set el_li to "<li><a href=" & URL of t & ">" & name of t & "</a>"
set htmlout to htmlout & el_li
end repeat
set htmlout to "<ul>" & htmlout & "</ul>"
end tell

set textutil to "| textutil -stdin -inputencoding utf8 -format html -convert rtf -stdout | pbcopy"
do shell script "echo " & quoted form of htmlout & textutil (* escape erforderlich*)

return input
end run

 

Of course you could put this script into an Alfred workflow as well. 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...