Till now from the Google, i got some html parser for parsing HTML page. but i am unable to choose one from them. Below is my objective-
- Parse the values dynamically from html page, which conatins JS. I need to parse some of these JS also.
- Send GET/POST req to the server with extracted values
Part 1 seems little bit complicated yet, since i am not able to pick better parser. Help Please.
Below is the snippet of html page-
<input style="display: none;" name="hiddenAction" value="myval" type="hidden">
<input name="ml_uiss" id="ml_uiss" value="aba972kd82lw" type="hidden">
<input style="display: none;" name="Key" id="Key" value="56n8f48jfn98cwnc38c398nc83nx2b9c32n.an24" type="text">
<input name="AvKbkGPQr" class="iswickEnabled input" maxlength="10" id="AvKbkGPQr" onkeyup="javascript:checkIt(this);" onkeydown="javascript:checkIt(this);" onchange="javascript:checkIt(this);" value="1234567890" onfocus="this.value='';" type="text"> <input name="PjbkAPker" class="iswickEnabled input" maxlength="10" id="PjbkAPker" onkeyup="javascript:checkIt(this);" onkeydown="javascript:checkIt(this);" onchange="javascript:checkIt(this);" type="text">
<input id="timeCheck" name="timeCheck" value="23:38:20" type="hidden">
<input name="isDone" id="isDone" value="prq" type="hidden">
from the above html, i want to read below values-
ml_uiss=aba972kd82lw
key=56n8f48jfn98cwnc38c398nc83nx2b9c32n.an24
timeCheck=23:38:20
Below is the js snippet-
<script type="text/javascript">
var element = document.createElement("input");
element.setAttribute("type", "hidden");
element.setAttribute("value", "");
element.setAttribute("name", "AzPwXPs");
element.setAttribute("id", "AzPwXPs");
var foo = document.getElementById("dnipb");
foo.appendChild(element);
var element1 = document.createElement("input");
element1.setAttribute("type", "hidden");
element1.setAttribute("value", "6D6AB8AECC9B28235F1DE39D879537E1");
element1.setAttribute("name", "ZLZWNK");
element1.setAttribute("id", "ZLZWNK");
foo.appendChild(element1);
</script>
From the above js, i want to read below values-
AzPwXPs=
ZLZWNK=6D6AB8AECC9B28235F1DE39D879537E1