enigma2k Posted May 26, 2014 Share Posted May 26, 2014 Hi, Could anybody tell me please how I can create a custom search for the GolfWRX forum. This is the link and at the top there is the search field: http://www.golfwrx.com/forums/ When I put in my search query I can't see it afterwards in the address bar (as it is the case for many other sites). Is there any app that helps me to see how the search query is sent to the site? Link to comment
deanishe Posted May 26, 2014 Share Posted May 26, 2014 You can right-click on the search field and choose Safari's or Chrome's or Firefox's "Inspect Element" to look at the source code and see what the search query parameter is called. It's not super straightforward, however, so I did it for you. If you create a custom search in Alfred with this URL: http://www.golfwrx.com/forums/index.php?app=core&module=search&do=search&fromMainBar=1&search_term={query} it should do what you want. The {query} at the end is what Alfred inserts the search query into. search_term is the name of the query form input field (i.e. what the website expects the query to be called). enigma2k 1 Link to comment
enigma2k Posted May 26, 2014 Author Share Posted May 26, 2014 Thank you this worked for me. I have looked through it with the inspector tool and I understand how you did it. Thanks for the instruction! There is another site (telephone book) which I'm afraid is a bit more complicated: http://www.herold.at/telefonbuch/ It is about the first field that is called "Wer, Was?". I have found the line with the inspector: http://www.herold.at/servlet/at.herold.sp.servlet.SPWPSearchServlet and the field is called "searchterm". Unfortunately it doesn't work the same way as GolfWRX. How can I connect them so it works in Alfred? Link to comment
deanishe Posted May 26, 2014 Share Posted May 26, 2014 You have the right URL (http://www.herold.at/servlet/at.herold.sp.servlet.SPWPSearchServlet), but because there's only one "argument", you have to do: http://www.herold.at/servlet/at.herold.sp.servlet.SPWPSearchServlet?searchterm={query} Note the ?. enigma2k 1 Link to comment
enigma2k Posted May 26, 2014 Author Share Posted May 26, 2014 (edited) Thank you so much deanishe! I highly appreciate your help! So every time there is only one argument you have to use a "?" instead of "&"? Edited May 26, 2014 by enigma2k Link to comment
deanishe Posted May 26, 2014 Share Posted May 26, 2014 (edited) Thank you so much deanishe! I highly appreciate your help! So every time there is only one argument you have to use a "?" instead of "&"? Yup. You use ? to connect the first argument to the base URL, and & to add subsequent ones. The Golfwrx search URL is a good example. Edited May 26, 2014 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