Elements inside
<body class="body"> <div class="headColor"> <div class="headControl"> <img class="image-abclogo" src="https://mobile.abchina.com/mpay/mobileBank/zh_CN/EBusinessModule/image/abclogo.png"></img> </div> </div> <div class="container"> <br /> <h5 class="form-signin-heading">农行网上K码支付:<br /></h5> <form method="post" action="/mpay/KCodePaymentCheckAct.ebf"> <label for="inputPassword" class="sr-only">农行卡号:</label> <input type="text" class="form-control" placeholder="请输入卡号" required autofocus style="margin:0px 0px 3px 0px;" name="CardNo"/> <label for="inputPassword" class="sr-only">手机号后四位:</label> <input type="text" class="form-control" placeholder="请输入手机号后四位" required autofocus style="margin:0px 0px 3px 0px;" name="MobileNo"/> <input type="text" id="indentityCode" class="form-control" placeholder="请输入验证码" required style="margin:0px 0px 3px 0px;" name="imageCode" maxlength="4"> <img class="image-indentity pull-right" style="margin:0px 8px 0px 0px;" src="kimageCodeAct.do?random=201504301102343603&ebf_cookie=evniwmih5jg3m4gz4c5uxuch" alt="" /> <input type="hidden" name="MerchantID" value=""/> <input type="hidden" name="MerchantName" value="******"/> <input type="hidden" name="OrderNo" value="J000302015043011025128810001"/> <input type="hidden" name="OrderAmount" value="3.50"/> <input type="hidden" name="OrderDate" value="2015/4/30 0:00:00"/> <input type="hidden" name="OrderTime" value="2015/4/30 11:02:51"/> <input type="hidden" name="abc_formId" value="9999"/> <input type="hidden" name="isRead" value="0"/> <input type="hidden" name="payment" value="1"/> <input type="hidden" name="TokenTmp" value="14303629533850965238"/> <input type="hidden" name="payTypeTmp" value="1010"/> <br /> <button class="btn btn-lg btn-abc btn-block" type="submit" onclick="">确定</button> <input type="hidden" name="ebf_cookie" value="evniwmih5jg3m4gz4c5uxuch"/></form> <br /><br /> <p class="text-center sr-only">m.abchina.com</p> <p class="text-center sr-only">全国24小时服务热线:95599</p> <p class="text-center sr-only">中国农业银行版权所有</p> </div><!-- /.container --> <p class="text-center"> m.abchina.com<br /> 全国24小时服务热线:95599<br /> 中国农业银行版权所有 </p> <!-- Bootstrap core JavaScript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> <script src="js/jquery-2.1.3.min.js"></script> <script src="js/bootstrap.min.js"></script> <!-- IE10 viewport hack for Surface/desktop Windows 8 bug --> <script src="../../assets/js/ie10-viewport-bug-workaround.js"></script> </body>
<img class="image-abclogo" src="https://mobile.abchina.com/mpay/mobileBank/zh_CN/EBusinessModule/image/abclogo.png"></img>
<img class="image-indentity pull-right" style="margin:0px 8px 0px 0px;" src="kimageCodeAct.do?random=201504301102343603&ebf_cookie=evniwmih5jg3m4gz4c5uxuch" alt="" />
Is it the element that jsoup cannot get the verification code?
I need to get the verification code image here, and the solution I thought of is: get the verification code image element, and get its "src",
to get the verification code image.
Is there any other way to get it? Thank you!
No one answered! ! ! !
1. Is the source code you posted copied by the browser or collected and printed by jsoup?
2. If it is copied, please use jsoup to access and print to see if it exists. The img you mentioned
3. According to your description, the img you mentioned does not exist. This img may be generated by js.
4. If it is generated by js, then you need to study the js of this page, and then find the js that generates the url and generate it yourself.
5. After getting the url, you need Note that when requesting this URL, you need to maintain the session of your page, which is the sessionid. Some websites may also have requirements for rf. It is recommended to use Google Chrome to look at all the parameters of the request, and then simulate them all, so Only the obtained verification code may be correct
1. Is the source code you posted copied by the browser or collected and printed by jsoup
2. If it is copied, then please use jsoup access and print to see if the img you mentioned exists
3. According to your description, the img you mentioned should not exist. This img may be generated by js.
4. If it is generated by js, then you need to study the js of this page, and then find the js that generates the url and generate it yourself.
5. After getting the url, you need Note that when requesting this URL, you need to maintain the session of your page, which is the sessionid. Some websites may also have requirements for rf. It is recommended to use Google Chrome to look at all the parameters of the request, and then simulate them all, so Only the verification code obtained may be correct