[英]How to get value from website using Jsoup?
I want to extract href title <a href="https://kwejk.pl">43797</a>
so I could assign it to variable in my app.我想提取 href 标题
<a href="https://kwejk.pl">43797</a>
以便我可以将它分配给我的应用程序中的变量。 My code is not working unfortunatelly.不幸的是,我的代码无法正常工作。
I want to assign "43797" to string Result.我想将“43797”分配给字符串结果。
You've selected li
tag Now you need to get first his child and then get text您已选择
li
标签 现在您需要先获取他的孩子然后获取文本
Elements liChildren = element.children();
Element first = liChildren.first();
String res = first.text();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.