Jump to content

How to make Web Search without {query} option?


Recommended Posts

There are some websites especially forum websites where the search function doesn't return any search queries in the address bar, so most likely it has to be done some other ways. When I inspect the search element I find this

 <input type="search" id="elSearchField" placeholder="Search..." name="q" itemprop="query-input">

Any ideas how to do so?

 

 

P.S. Here is one of the forum: https://nethingoez.com/

Link to comment
2 hours ago, dave_the_rave said:

When I inspect the search element I find this

 

That's not enough: the input only gives you the parameter name. You also need the corresponding form's  action to see which URL the parameters should be passed to.

 

A look at the form source code on nethingoez.com shows the following:

 

<meta itemprop="target" content="https://nethingoez.com/search/?q={q}">


So all you need to do is use the URL https://nethingoez.com/search/?q={query}

Link to comment
19 hours ago, deanishe said:

 

That's not enough: the input only gives you the parameter name. You also need the corresponding form's  action to see which URL the parameters should be passed to.

 

A look at the form source code on nethingoez.com shows the following:

 

<meta itemprop="target" content="https://nethingoez.com/search/?q={q}">


So all you need to do is use the URL https://nethingoez.com/search/?q={query}

 

 

Wops let me see if i can get it to work! Thanks a lot dude

Edited by dave_the_rave
Link to comment
20 hours ago, deanishe said:

 

That's not enough: the input only gives you the parameter name. You also need the corresponding form's  action to see which URL the parameters should be passed to.

 

A look at the form source code on nethingoez.com shows the following:

 

<meta itemprop="target" content="https://nethingoez.com/search/?q={q}">


So all you need to do is use the URL https://nethingoez.com/search/?q={query}

 

 

OK so i have done it one another website using this method, but there is another forum where I am unable to do the same could you please have a look: www.mpgh.net

 

P.S. It just redirect me to the advanced search, what i wanna do is directly do quick search (included on the upper right corner of the web) I have tried with https://www.mpgh.net/forum/search.php?query={query} but that doesn't work either

 

 

 

Edited by dave_the_rave
Link to comment

Not possible as best as I can tell.

 

The search box at top-right appears to fundamentally lead to the advanced search page. Which itself doesn't work unless you do the Captcha.

 

So the closest you can get (apparently) is https://www.mpgh.net/forum/search.php?do=process&query={query}, which will take you to the advanced search form with the search query pre-filled. You still need to check the Captcha and start the actual search.

 

Link to comment

 

Quote

The search box at top-right appears to fundamentally lead to the advanced search page. Which itself doesn't work unless you do the Captcha.

 

I am not sure what captcha are you talking about, when i type something on that upper right corner box and hit enter, it leads me directly to the results without advanced search or any captchas, perhaps on your end its showing captcha because you are not signed in to the website hmmm. OK let me forward you the source code after i search from that quick search for example i will search for "duck", here is the source code: https://pastebin.com/cFYNAEDr

Edited by dave_the_rave
Link to comment
3 hours ago, dave_the_rave said:

perhaps on your end its showing captcha because you are not signed in to the website

 

Could be. There's really not much more I can say if it is a login issue.

 

The source you posted has a security token in the form (for me it was "guest"). It's likely that the site needs that to show the results. If that is the case, then it's not possible to create an Alfred web search for the site.

Link to comment
17 hours ago, deanishe said:

 

Could be. There's really not much more I can say if it is a login issue.

 

The source you posted has a security token in the form (for me it was "guest"). It's likely that the site needs that to show the results. If that is the case, then it's not possible to create an Alfred web search for the site.

 

OK so what if I send you a disposable account for this site, any possibility?

 

Please have a look here is an account: 

username: hamdasd

password: password1

 

BTW i found 2 lines with token: 

var SECURITYTOKEN = "1528633932-bbc37706e9ea0c1f8de6e40eba32b58de37a8d3e";

and 

<input type="hidden" name="securitytoken" value="1528633932-bbc37706e9ea0c1f8de6e40eba32b58de37a8d3e" />

 

I wonder if this is what we need..

Edited by dave_the_rave
Link to comment

Does the above URL not work for you?

 

On 6/10/2018 at 2:12 PM, dave_the_rave said:

OK so what if I send you a disposable account for this site, any possibility?

 

If the above URL doesn't work for a logged-in user, it's likely the token needs to be submitted with the search. It's also likely that the token changes regularly. That's the proper way to do it, in any case.

Link to comment
19 hours ago, deanishe said:

Does the above URL not work for you?

 

 

Not it didn’t

 

20 hours ago, deanishe said:

If the above URL doesn't work for a logged-in user, it's likely the token needs to be submitted with the search. It's also likely that the token changes regularly. That's the proper way to do it, in any case.

 

How do i insert those tokens? Could you please check it ? I already gave you an account for testing on mpgh.net

 

username: hamdasd

password: password1

Link to comment

The URL I posted above works for me when I'm logged in:

web-search.gif.f295b19ce2d6f6f5f72f34aaa63cf8c6.gif

Here's the working search exported from Alfred. Copy and paste it into Alfred (or Safari).

alfred://customsearch/Search%20for%20%E2%80%9C%7Bquery%7D%E2%80%9D%20on%20mpgh.net/mpgh/utf8/nospace/https%3A%2F%2Fwww.mpgh.net%2Fforum%2Fsearch.php%3Fdo%3Dprocess%26query%3D%7Bquery%7D

 

Link to comment
13 hours ago, deanishe said:

The URL I posted above works for me when I'm logged in:

web-search.gif.f295b19ce2d6f6f5f72f34aaa63cf8c6.gif

Here's the working search exported from Alfred. Copy and paste it into Alfred (or Safari).


alfred://customsearch/Search%20for%20%E2%80%9C%7Bquery%7D%E2%80%9D%20on%20mpgh.net/mpgh/utf8/nospace/https%3A%2F%2Fwww.mpgh.net%2Fforum%2Fsearch.php%3Fdo%3Dprocess%26query%3D%7Bquery%7D

 

 

Firsrtly thanks a lot for this u are awesome, second how did you find out the solution? I want to use it to make search system for other platforms too and 3rd how did you make this cool gif? 

Link to comment
19 hours ago, deanishe said:

look at the source code for the search form and translate the form parameters into URL parameters

 

Which part did you look up in the source code for distinguish to add "do=process" ?

 

I am stuck with yet another forum, no clue when i look up the source code for it:

 

www.nulled.to

 

Here is the source code after doing a quick search for "helloworld" 

https://pastebin.com/SgD5ZfiG

 

Edited by dave_the_rave
Link to comment
  • 3 years later...

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