Jump to content

DownMedia — Download media from popular sources


Recommended Posts

14 hours ago, vitor said:

 

Because you’ve installed the Services (:downmediaservices in Alfred).

 

 

What program?

  Enabling it addressed that issue thank you!

 

 

Sorry I used the word Program but I meant workflow. Thanks for your help!

Link to post
  • Replies 359
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Download media from a plethora of sources, even when embedded in other pages. The main commands are dv to download video and da to download audio (often extracted from a video source). Bot

Thanks Vitor!!   This is the very first Alfred Workflow I have downloaded and used, and it works great!!  I am very, very, very new to Alfred and all things having to do with running commands in ter

Update. Added support to download audio. It also works with downloading a full playlist as audio, but it does not include and option to add to WatchList automatically due to a limitation in yo

Posted Images

I have a similar kind of problem with using the da command. It keeps saving it as OPUS.

 

OS ver: 10.15.4

Alfred ver: 4.09

Workflow ver: 20.2

Youtube-dl ver: 2020.05.03 (installed via brew)

ffmpeg ver: 4.2.2

 

Workflow env vars

image.png.50b01f51a93486f403abd6843f3d8108.png

 

Log cap

[17:40:39.098] DownMedia[Script Filter] Queuing argument ''
[17:40:39.800] DownMedia[Script Filter] Script with argv '' finished
[17:40:39.804] DownMedia[Script Filter] {"items":[{"uid":"downmedia audio","subtitle":"Add to WatchList (⌥): true 𐄁 Full Playlist (⌘): false","valid":true,"variables":{"media_type":"audio","add_to_watchlist":true,"full_playlist":false},"mods":{"cmd":{"subtitle":"Add to WatchList (⌥): true 𐄁 Full Playlist (⌘): true","variables":{"media_type":"audio","Add_to_watchlist":true,"full_playlist":true}},"alt":{"subtitle":"Add to WatchList (⌥): false 𐄁 Full Playlist (⌘): false","variables":{"media_type":"audio","add_to_watchlist":false,"full_playlist":false}},"cmd+alt":{"subtitle":"Add to WatchList (⌥): false 𐄁 Full Playlist (⌘): true","variables":{"media_type":"audio","add_to_watchlist":false,"full_playlist":true}}},"title":"Act On Instinct - YouTube Music","arg":"https://music.youtube.com/watch?v=tWwoyxHl7X8&list=RDAMVMtWwoyxHl7X8"}]}
[17:40:40.493] DownMedia[Script Filter] Processing complete
[17:40:40.496] DownMedia[Script Filter] Passing output 'https://music.youtube.com/watch?v=tWwoyxHl7X8&list=RDAMVMtWwoyxHl7X8' to Run Script
[17:40:49.448] STDERR: DownMedia[Run Script] xattr: No such file: /Users/xyz/Downloads/Act On Instinct.webm
55:194: execution error: Alfred 4 got an error: Cannot find workflow with Id 'com.vitorgalvao.alfred.watchlist' (-2)
You do not have WatchList installed. Download it at https://github.com/vitorgalvao/alfred-workflows/tree/master/WatchList
[17:40:49.457] DownMedia[Run Script] Processing complete
[17:40:49.458] DownMedia[Run Script] Passing output '' to Run Script

 

If you need any additional information or need me to try out anything, please let me know.

 

Regardless, thank you for this awesome workflow! 😁

Link to post
  • 4 weeks later...

Hi, I'm really struggling to get it work. I'm completely new to Alfred and Workflows.

OS ver: 10.15.5

Alfred ver: 4.09

Workflow ver: 20.2

 

I downloaded the latest version of your workflow but when i enter the keyword "dv" with a youtube tab open and running nothing happens. Could you tell me what i'm missing? Thank you very much in advance!

Edited by wardepauw
Link to post

Hi @wardepauw, welcome to the forum.

 

23 minutes ago, wardepauw said:

with a youtube tab open and running nothing happens

 

In which browser?

 

BTW, it’s basically impossible to help you with a description like “nothing happens”. If you’re having a problem with a workflow, please always check Alfred’s debugger and post what you see in there (making sure to remove any personal info like email addresses or passwords, first).

Link to post

Hi @deanishe thanks for your quick reply! i'm sorry. I'm using Opera browser, but i also tried the workflow in Safari. I didn't give more info because i simply downloaded the workflow and started testing it. I don't know if i have to add something to the script or install additional software. Like I said, I'm really a newbie.

Link to post

The logging started at last:

[23:57:18.792] Logging Started...

[00:05:09.228] DownMedia[Hotkey] Processing complete

[00:05:09.232] DownMedia[Hotkey] Passing output '' to Run Script

[00:05:10.225] DownMedia[Run Script] Processing complete

[00:05:10.229] DownMedia[Run Script] Passing output 'https://www.youtube.com/watch?v=AMkIcGYuA14

' to Play Sound

[00:05:10.252] DownMedia[Play Sound] Processing complete

[00:05:10.257] DownMedia[Play Sound] Passing output 'https://www.youtube.com/watch?v=AMkIcGYuA14

' to Arg and Vars

[00:05:10.258] DownMedia[Arg and Vars] Processing complete

[00:05:10.259] DownMedia[Arg and Vars] Passing output 'https://www.youtube.com/watch?v=AMkIcGYuA14

' to Arg and Vars

[00:05:10.260] DownMedia[Arg and Vars] Processing complete

[00:05:10.261] DownMedia[Arg and Vars] Passing output 'https://www.youtube.com/watch?v=AMkIcGYuA14

' to Run Script

[00:05:10.684] ERROR: DownMedia[Run Script] Could not download resource.

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:213:in `spawn': No such file or directory - youtube-dl (Errno::ENOENT)

from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:213:in `popen_run'

from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:159:in `popen2'

from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:342:in `capture2'

from /Users/wardepauw/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.9E596EAF-4B6F-4853-A21E-5F2447102B41/downmedia_functions.rb:177:in `download_url'

from /Users/wardepauw/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/003BECA1-9ADC-40A9-A822-3FBFFE0FDD64:5:in `<main>'

[00:05:10.693] DownMedia[Run Script] Processing complete

[00:05:10.695] DownMedia[Run Script] Passing output '' to Run Script

[00:05:13.903] DownMedia[Script Filter] Queuing argument ''

[00:05:14.347] DownMedia[Script Filter] Script with argv '' finished

[00:05:14.357] ERROR: DownMedia[Script Filter] Code 1: Could not download resource.

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:213:in `spawn': No such file or directory - pbpaste (Errno::ENOENT)

from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:213:in `popen_run'

from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:159:in `popen2'

from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:342:in `capture2'

from /Users/wardepauw/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.9E596EAF-4B6F-4853-A21E-5F2447102B41/downmedia_functions.rb:19:in `show_options'

from /Users/wardepauw/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/5C692A4D-3011-4AEB-9DB0-23678B2E3493:3:in `<main>'

[00:05:19.391] DownMedia[Script Filter] Queuing argument ''

[00:05:19.808] DownMedia[Script Filter] Script with argv '' finished

[00:05:19.818] ERROR: DownMedia[Script Filter] Code 1: Could not download resource.

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:213:in `spawn': No such file or directory - pbpaste (Errno::ENOENT)

from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:213:in `popen_run'

from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:159:in `popen2'

from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:342:in `capture2'

from /Users/wardepauw/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.9E596EAF-4B6F-4853-A21E-5F2447102B41/downmedia_functions.rb:19:in `show_options'

from /Users/wardepauw/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/FD57D642-1E05-4BD7-9E8B-41CD2490CF11:3:in `<main>'

[00:05:22.937] DownMedia[Script Filter] Queuing argument ''

[00:05:23.336] DownMedia[Script Filter] Script with argv '' finished

[00:05:23.347] ERROR: DownMedia[Script Filter] Code 1: Could not download resource.

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:213:in `spawn': No such file or directory - pbpaste (Errno::ENOENT)

from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:213:in `popen_run'

from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:159:in `popen2'

from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:342:in `capture2'

from /Users/wardepauw/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.9E596EAF-4B6F-4853-A21E-5F2447102B41/downmedia_functions.rb:19:in `show_options'

from /Users/wardepauw/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/828B65E7-6E76-427D-80E7-1B8C6E9F5EA2:3:in `<main>'

[00:05:25.188] DownMedia[Script Filter] Queuing argument ''

[00:05:25.551] DownMedia[Script Filter] Script with argv '' finished

[00:05:25.562] ERROR: DownMedia[Script Filter] Code 1: Could not download resource.

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:213:in `spawn': No such file or directory - pbpaste (Errno::ENOENT)

from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:213:in `popen_run'

from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:159:in `popen2'

from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:342:in `capture2'

from /Users/wardepauw/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.9E596EAF-4B6F-4853-A21E-5F2447102B41/downmedia_functions.rb:19:in `show_options'

from /Users/wardepauw/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/E1F01458-0F2F-4F0C-AA42-9D16A822606E:3:in `<main>'

Link to post

@vitor

 

This is the output I get from the command:

-bash: /Users/wardepauw/Library/Application Support/Alfred/Workflow Data/com.vitorgalvao.alfred._sharedresources/bin/youtube-dl: No such file or directory

Wars-Mac-mini-2:~ wardepauw$ 

OS ver: 10.15.5

Alfred ver: 4.09

Workflow ver: 20.2

 

I don't know what's going wrong.

 

Thank you very much in advance for your help!

 

Link to post

@wardepauw If you have Homebrew, you can install youtube-dl with brew install youtube-dl. If not, why don’t you try downloading youtube-dl from the URL Vítor posted earlier, and manually putting it where the workflow is looking for it?

 

One possible cause of the issue might be a firewall. Do you have Little Snitch or similar installed that's preventing the workflow from contacting the Internet?

Link to post
  • 3 weeks later...
  • 1 month later...
  • 3 weeks later...

Hopefully useful information: the download may be failing because of an expired SSL certificate on https://yt-dl.org

 

The workflow is failing for me with the same error as above (failing to download youtube-dl). Have just tried to download it using the instructions in the GitHub readme at https://github.com/ytdl-org/youtube-dl#installation , and curl tells me that the ssl certificate for https://yt-dl.org/downloads/latest/youtube-dl has expired. 

 

For politeness sake:

 

DV v 20.8

Alfred 4.1.1 [1172]

macOS 10.15.1 (19B77a) (some beta because my other half passed on this machine to me, and it's still enrolled in the beta thing, arg, I need to sort that)

Failing on https://www.bbc.co.uk/programmes/p056qcjq 

 

(don't currently have brew installed, that's my next troubleshooting step, this isn't yet a request for help!)

 

Alfred Workflow Log: 

Quote

 

[22:02:28.641] ERROR: DownMedia[Script Filter] Code 1: Could not download youtubedl.

/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:213:in `spawn': No such file or directory - pbpaste (Errno::ENOENT)

from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:213:in `popen_run'

from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:159:in `popen2'

from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/open3.rb:342:in `capture2'

from /Users/-user-/Dropbox/cross-machine-preferences/alfred/alfred preference sync/Alfred.alfredpreferences/workflows/user.workflow.42FACE44-B650-42ED-B105-AC5DF12B0612/downmedia_functions.rb:38:in `show_options'

from /Users/-user-/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/53846C70-D0B0-4C55-9348-1BA034CE2603:3:in `<main>'

 

 

 

curl log 

Quote

 

-user- ~ % sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl

sudo chmod a+rx /usr/local/bin/youtube-dl

Password:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0

curl: (60) SSL certificate problem: certificate has expired

More details here: https://curl.haxx.se/docs/sslcerts.html

 

curl failed to verify the legitimacy of the server and therefore could not

establish a secure connection to it. To learn more about this situation and

how to fix it, please visit the web page mentioned above.

chmod: /usr/local/bin/youtube-dl: No such file or directory

 

 

Link to post
  • 2 months later...

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...