1

The issue happens when searching on https://forum.mobilism.org

An account is needed, so I created one and then created a request in insomnia to login on this url : https://forum.mobilism.org/ucp.php?mode=login

The cookies are then stored by insomnia, and I created a request to search with a keyword on this url : https://forum.mobilism.org/search.php?sr=topics&sf=titleonly&keywords=test

This request works fine and returns the search results as it would in a web browser.

But then when generating a get or curl request, the page returned doesn't contain the results and asks to login (although the cookies are in the request).

I don't see what the difference is in between the insomnia request and the one with curl or wget.

1 Answers1

1

This request works fine and returns the search results as it would in a web browser.

But then when generating a get or curl request, the page returned doesn't contain the results and asks to login (although the cookies are in the request).

Generally User-Agent request header is used by browser or other software to identify itself. wget option for setting is

--user-agent=agent-string

Identify as agent-string to the HTTP server.(...)

Please try specifying same User-Agent as your browser is using and check if it would help.

Daweo
  • 31,313
  • 3
  • 12
  • 25
  • I tried in the past with a user agent which didn't work, no idea why. This time I generated a curl command from the network tab of the devtools, removed everything except the cookie and the user-agent and it worked. Thanks ! – GontranMacedoine Feb 16 '23 at 15:54