Efty.Edge Posted April 11, 2013 Posted April 11, 2013 (edited) Hi. First i would like to thank David Ferguson and Subject22 for their help. The following Workflow automatic downloads the Youtube video which is opened in your Browser. To do this, the workflow made use of the Python Script 'youtube-dl' developed by RICARDO GARCIA GONZALES and his Team. Here is the link to their project site: http://rg3.github.io/youtube-dl/index.html I use this command line script since several month and it is fantastic, because it downloads a movie in the highest available qualitiy. Nothing more, nothing less. And the best - it supports... YouTube.com, metacafe.com, Google Video, Photobucket videos, Dailymotion, DepositFiles, blip.tv, vimeo, myvideo.de, The Daily Show / Colbert Nation, The Escapist, CollegeHumor, arte.tv, Soundcloud, xvideos, infoq, mixcloud, Stanford Open Content, Youku, MTV, XNXX, Google Plus, A generic downloader that works in some sites To download a video just open a youtube site in your browser and start the Workflow with the keyword. It is not necessary to view the video during the download, it can be paused. The download itself begins immediately and is finished if the final notification says so. The filename and the file extension of the downloaded video file is generated from the youtube-dl script. When finished the video resides on your Desktop. Sorry, but until the reported problem with the AllInOne workflow can be fixed, i will post the single versions. ;( Firefox Google Chrome Google Chrome Canary Opera Safari Webkit Updates: 2013-04-15: Split the AllInOne workflow to single ones 2013-04-12: Support for Safari, Google Chrome, Firefox, Webkit, Opera, Google Chrome Canary 2013-04-12: Pick the url from the frontmost browser 2013-04-12: Error Handling and Notifications Edited April 15, 2013 by Efty Edge Sridhar Katakam and StDt 2
Florian Posted April 11, 2013 Posted April 11, 2013 Any chance you'd consider implementing an option for downloading only the audio ? I believe they have that option on the original project.
vitor Posted April 11, 2013 Posted April 11, 2013 (edited) Personally, I think cclive is a superior downloader, but yes, most people may prefer youtube‐dl (I think it’s more popular). Also, I don’t known if you’re interested, but I solved the “pick a browser” issue with PinAdd, in case you want to implement it, or want to some help to do it. It currently supports Chrome, Chrome Canary, Safari, and Webkit. You need an extra step (only the first time) to configure it, but it’s easier for you to maintain just one script. If you’re interested, take a look at the code (lines 16 through 30 are the relevant ones). Edited April 11, 2013 by Vítor
Efty.Edge Posted April 11, 2013 Author Posted April 11, 2013 Hi Vitor. If you like, feel free to do the changes. Any help or idea is welcome! I must confess, that i'm a real applescript newbie and this small script above are more the 10 hours of work. But i'm really sure, that with the help in this forum i can get even better. Good night from Germany Efty
vitor Posted April 11, 2013 Posted April 11, 2013 I'm a real applescript newbie and this small script above are more the 10 hours of work. I know the feeling, applescript always makes me hate the time I spend with it. If you work better with something like bash, what I recommend is that you do most of your script with it, and when you need applescript call it by doing osascript -e '<applescript_code_here>'
tschoof Posted April 12, 2013 Posted April 12, 2013 Good idea, for the occasional likely-to-get-deleted-soon YouTube vid, looking forward
Ilithian Posted April 14, 2013 Posted April 14, 2013 I'm sorry but I don't know how I can make this work with any other browser than Safari. How can I do that?
DJay Posted April 14, 2013 Posted April 14, 2013 Unfortunately doesn't work for me. After these two notifications direct after each other nothing happened. Using OSX 10.8.3 Safari 6.0.3 What am I doing wrong?
vitor Posted April 14, 2013 Posted April 14, 2013 I'm sorry but I don't know how I can make this work with any other browser than Safari. How can I do that? Looking at the code, it seems it will act depending on what browser you are currently viewing. Simply put, if the browser is not your frontmost app, it will not work.
Ilithian Posted April 14, 2013 Posted April 14, 2013 That's what I thought, but is isn't working for me with Webkit or Chrome. Just Safari seems to work...
tschoof Posted April 15, 2013 Posted April 15, 2013 Unfortunately doesn't work for me. After these two notifications direct after each other nothing happened. Using OSX 10.8.3 Safari 6.0.3 What am I doing wrong? Same here, nothing happening.
vitor Posted April 15, 2013 Posted April 15, 2013 (edited) I think due to how the workflow operates, you may be leaving youtube too soon. The problem is that when it says “Download Started… Watch your desktop”, the download has in fact not yet started, and if you switch to your desktop (or close the tab), you’ll miss it. Here’s how the workflow works. 1. You call the workflow by typing “yd”. 2. The workflow outputs a message, saying the download started. 3. Some applescript code runs to identify your frontmost browser. 4. If it succeeds, it’ll ask your browser for the url of the frontmost tab. 5. “youtube‐dl” is called, and the download starts. So try calling the workflow, and then waiting a while without doing anything, to see if it works. It’s not ideal, and there should probably be a setting to define the browser instead of trying to guess it, which would make it faster. Also bear in mind, firefox users, that there’s no good way to get the URL via applescript in firefox, only hacky ways (sending keystrokes to copy it), which can be very error prone. Edited April 15, 2013 by Vítor
davidyannick Posted April 15, 2013 Posted April 15, 2013 just downloaded youtube-dl but where must I put It ? /usr/bin but when I try youtube-dl the issue is permission denied ...
Efty.Edge Posted April 15, 2013 Author Posted April 15, 2013 Hi Vitor. You are right, the firefox part is a little bit tricky, but there is no direct applescript support. But on my MBPR it works flawless. By the way - the last hours i tried to reproduce the error but i can't. I've no idea whats the reason!? Maybe anyone else had an idea. Efty
Efty.Edge Posted April 15, 2013 Author Posted April 15, 2013 Hi davidyannik,there is no reason to download youtube-dl seperatly.It's part of the workflow and already placed in the workflow folder. So - just install the workflow for your browser and give it a try.Efty
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