gpt4 book ai didi

java - JSoup 在网页上看不到表格

转载 作者:行者123 更新时间:2023-12-01 18:32:40 25 4
gpt4 key购买 nike

我想从网页获取表格:

<table class="coupon-row-item coupone-labels">...</table>

我用

Element market = page.select("table[class=coupon-row-item coupone-labels").first();

并得到

Exception in thread "main" org.jsoup.select.Selector$SelectorParseException: Did not find balanced marker at 'class=coupon-row-item coupone-labels'

功能齐全

protected void getMainMarked(ArrayList<String> arrLinks) throws IOException {
Document page = Jsoup.parse(new URL(arrLinks.get(0)), 5000);
Element market = page.select("table[class=coupon-row-item coupone-labels").first();
}

最佳答案

我想尝试以下选择器语法(如 Jsoup documentation 中所述):

Element el = doc.select("table.coupon-row-item.coupone-labels").first();

关于java - JSoup 在网页上看不到表格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60130191/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com