I'm trying to send data into search form in a website using jsoup. but this input doesn't have a name can anyone help me the website looks like this
I tried using the form name but it doesn't work
<form name="f">
<input id="y" autocomplete="off">
....
<input>
<select id="s" style="">
<option value="a">A</option>
<option value="b">B</option>
</select>
</form>
here i want to send data to the input with the id y and get some result if the data is sent but the result is empty
It doesn't have a name probably because there's some javascript code to get the value and then send request.
According to Roberto's advice it's really easily visible in browser's debugger in Network tab and you can see it's sent as a searchword
parameter:
The next problem you're going to have is that the response comes as a JSON and you can't parse it with Jsoup. You will have to get it with .ignoreContentType(true)
and then use some JSON parsing library.
But there seems to be another way. Just try to GET the URL directly with a search phrase like: https://manganelo.com/search/killua_san
The response already contains search results in HTML code so Jsoup will be able to parse it.