tomulent Posted July 3, 2015 Share Posted July 3, 2015 I'm trying to make a custom web search for the Wayback Machine. The query looks like this https://web.archive.org/web/*/{query} where {query} is a full URL from the clipboard. The problem is that Alfred changes the special characters into %2F and such so that the resulting search URL looks like: https://web.archive.org/web/*/http%3A%2F%2Fexamplecom%2F Is this solvable, or will I need a workflow of some sort? Link to comment
RodgerWW Posted July 4, 2015 Share Posted July 4, 2015 (edited) Hmm, interesting. I'm not sure how Alfred handles the URL for searches, but in my testing it looks like you will have to convert the characters first in a workflow, or at least remove the first "http://" with parsing ... because "example.com" works ok. This MAY be a feature request for Alfred ... to internally parse out those characters Edited July 4, 2015 by RodgerWW Link to comment
deanishe Posted July 6, 2015 Share Posted July 6, 2015 (edited) Instead of using the Open URL action, use a Run Script action (language = bash) with: open "https://web.archive.org/web/*/{query}" It Just Works™.Alfred is between a rock and hard place here, as some (most?) websites expect {query} to be properly URL-encode, while others choke on such URLs. The fundamental issue is, unless {query} is the entire URL, Alfred treats {query} as the value to a GET parameter (e.g. http://www.example.com/?argument={query}). If {query} is actually part of the URL path (e.g. http://www.example.com/{query}/new), this will break on most browsers. Some are smart enough to realise when a URL-encoded string is part of the URL path, not the query string, but most aren't. Alfred should probably have a checkbox to turn URL-encoding on/off. Edited July 6, 2015 by deanishe Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now