Jump to content

Youtube-DL and Alfred

Recommended Posts



First time posting here, looking for some help.


I want to create a workflow that allows me execute my youtube-dl command in the terminal and I also want to create a folder to put the downloaded files in.


So basically the workflow needs to cd to a directory(predefined) and then make a newly named folder (query 1) and then download the file(s) from the URL (query 2).


I've done some looking around at having more than 1 query in alfred and I found some bin/bash script that works:


# split the query into an argument array
IFS=',' read -a qarg <<< "{query}"

# set the x and y queries from the array

But I'm not sure how to take those 2 queries and feed them into a terminal command within Alfred.


Any ideas?


Thanks in advance, I'm pretty new to this sorta stuff, but really loving Alfred and the stuff you can do!

Link to comment

I think I misunderstood your question.
Add the 2 lines I posted above to the bottom of the script you have (they will pass your arguments to youtube-dl), and then paste the whole lot in a Run Script action in Alfred's workflow builder. Set Language to /bin/bash and then connect it to your Keyword (where you enter your query).

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