Jump to content
politicus

Web searches: how to query multiple queries at one.

Recommended Posts

(As I am not sure if it is already possible, I post this thread here and not in Alfred features suggestions).

 

I was thinking about web searches found cool how easy it is to create them. One url + {query}. Done.

 

I was wondering if it was possible to perform multiple queries at once. For example typing the following in Alfred's bar:

 

one web searches keyword + {query1}+{query2}+{query3}.

 

with the alexa.com web search I sat it would give :

 

sale keyboardmaestro.com,alfredapp.com,google.com

 

It would open 3 tabs with the result of each query. 

 

Maybe there are other way to do it.

 

I am just trying to find a way not to have to perform the same task three times.

Share this post


Link to post
2 hours ago, politicus said:

sale keyboardmaestro.com,alfredapp.com,google.com

 

That's not practically possible with a built-in websearch, no: That would make it impossible to search for anything with a comma in it.

 

It can be done easily enough with a workflow, however. You just need to split your input on whichever delimiter you've chosen (comma in your case), add it to the URL, then open it.

Share this post


Link to post
Posted (edited)

Yes, I did I even tried the workflows.  

 

The output will then contain the list of variables you've just created

I do not know how to work with the variables I get from the split action.

 

Here is what I get from the debug :

 

[20:32:39.148] Multiple queries at once[Keyword] Processing complete

[20:32:39.149] Multiple queries at once[Keyword] Passing output 'google,yahoo,bing' to Split Arg to Vars

[20:32:39.149] Multiple queries at once[Split Arg to Vars] Processing complete

[20:32:39.150] Multiple queries at once[Split Arg to Vars] Passing output 'google,yahoo,bing' to Debug

[20:32:39.151] Multiple queries at once[Debug] 'google,yahoo,bing', {

  var1 = "google"

  var2 = "yahoo"

  var3 = "bing"

}

[20:32:39.151] Multiple queries at once[Debug] Processing complete

[20:32:39.152] Multiple queries at once[Debug] Passing output 'google,yahoo,bing' to Open URL

 

Edited by politicus

Share this post


Link to post

Well, the no-code way would be to add a bunch of Filters with “if var1 is not empty”, “if var2 is not empty” etc. And connect each one to an Open URL action that uses {var:var1}, {var:var2} etc. instead of {query}.

 

That’s clunky, though, and it would be better to write a few lines of code to grab all the variables and stick them in URLs.

 

If you’d prefer that, I can help you with the code.

Share this post


Link to post

Thanks @deanishe But given my current programming skills, I prefer to add this in my workflows idea list. 

 

Message to anyone: feel free to steal the idea and develop the workflow 😀

Share this post


Link to post
6 hours ago, politicus said:

But given my current programming skills

 

Well why don't you give it a try, and I'll help you. That way, your programming skills might improve :) 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...