Jump to content

Download Media — Download video and audio from web pages


Recommended Posts

  • 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 comment

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 comment

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 comment

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 comment

@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 comment

@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 comment
  • 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 comment
  • 2 months later...

Ok, sorry. Here there are:

 

1) Output:

Updating Homebrew...

==> Updated Casks

epichrome                   protonmail-bridge           sequel-ace                  swish                       toolreleases

Warning: youtube-dl 2020.11.1.1 already installed

 

2) Workflow version: 20.10

3)Alfred version 4.2[1180]

4)Catalina 10.15.7

5) URL tested: https://www.youtube.com/watch?v=t8PcvrovE7k 

5)Debugger:

 

 

[15:56:35.733] DownMedia[Script Filter] Queuing argument ''

[15:56:36.478] DownMedia[Script Filter] Script with argv '' finished

[15:56:36.480] STDERR: DownMedia[Script Filter] /Applications/Alfred.alfredpreferences/workflows/user.workflow.8B093E4E-55DD-4A57-96B2-1773642F9F36/get_title_and_url.js: execution error: Error: Error: You need a supported browser as your frontmost app (-2700)

[15:56:36.480] 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":"https://www.youtube.com/watch?v=t8PcvrovE7k","arg":"https://www.youtube.com/watch?v=t8PcvrovE7k"}]}

[15:56:40.398] DownMedia[Script Filter] Processing complete

[15:56:40.400] DownMedia[Script Filter] Passing output 'https://www.youtube.com/watch?v=t8PcvrovE7k' to Run Script

[15:56:43.588] ERROR: DownMedia[Run Script] ERROR: Unable to extract JS player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

[15:56:43.594] DownMedia[Run Script] Processing complete

[15:56:43.594] DownMedia[Run Script] Passing output '' to Run Script

 

 

 

Thank you 🙂

 

 

Link to comment
5 hours ago, Daniele said:

[15:56:43.588] ERROR: DownMedia[Run Script] ERROR: Unable to extract JS player URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

 

youtube-dl is failing to grab that download, but the Workflow is working fine. We’ll have to wait for them to fix that (if they can).

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