Jump to content
dp1207

Mutli Parameter Web Search

Recommended Posts

I created a custom search for flightstats.com that opens up the status of a given flight (e.g. "UA101", for United flight number 101"). I travel a lot, so it's very helpful. FYI, here is the url code: ""http://www.flightstats.com/go/FlightStatus/flightStatusByRoute.do?departure={%1}&arrival={%2}".

 

Thanks.

Share this post


Link to post

Not with Alfred's built-in Open URL Action, no.
 
The problem is, Alfred will treat query as a single URL parameter if it isn't the whole URL.
 
What you need to do is generate the entire URL yourself and pass that to an Open URL Action or a Run Script Action with language = bash and the following code: open "{query}"

Share this post


Link to post
On 7/18/2015 at 9:04 PM, dp1207 said:

I created a custom search for flightstats.com that opens up the status of a given flight (e.g. "UA101", for United flight number 101"). I travel a lot, so it's very helpful. FYI, here is the url code: ""http://www.flightstats.com/go/FlightStatus/flightStatusByRoute.do?departure={%1}&arrival={%2}".

 

Thanks.

 

In addition to deanishe's answer, take a look at this thread for an example of another workflow that splits the arguments to look at Google Flights:

http://www.alfredforum.com/topic/5902-multiple-query-parsing-for-google-flights/

 

If you want to take a look at Andrew's original example workflow, you can download it here:

https://www.dropbox.com/s/3dbo30mhhk2cfsg/Kitten Image.alfredworkflow?dl=0

 

Hope this helps :)

Vero

Share this post


Link to post

Hi ! Thanks for the help for creating URL with 2 arguments.

I used the kitten sample, it's ok 🙂

 

Do you know what I have to do to add an automatic today date at the end of the URL ? 

Ex : http://mysite.com/bla/bla/20190110

I tried scripting, with no success...

 

Thanks !

Share this post


Link to post

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
×