我试图使用Jsoup在html中提取特定内容.以下是示例html内容.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body class="">
<div class="shop-section line bmargin10 tmargin10">
<div class="price-section fksk-price-section unit">
<div class="price-table">
<div class="line" itemprop="offers" itemscope="" itemtype="http://schema.org/Offer">
<div class="price-save">
<span class="label-td"><span class="label fksk-label">Price :</span></span>
</div>
<span class="price final-price our fksk-our" id="fk-mprod-our-id">Rs.<span class="small-font"> </span>11990</span>
</div>
<meta itemprop="price" content="Rs. 11990" />
<meta itemprop="priceCurrency" content="INR" />
<div class="our-price-desc fksk-our-price-desc">
<small>(Prices are inclusive of all taxes)</small>
</div>
</div>
</div>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
我使用以下命令获得了所需的输出:
document.select(".price-table").select(".line").select("span").get(2).text()
Run Code Online (Sandbox Code Playgroud)
看起来很冗长.我不能直接使用span类("价格最终价格我们的fksk-our")?
对此有何帮助?
从3天开始就从这个问题中苦苦挣扎.
当我在Windows(WAMP)中测试应用程序时,一切正常.但是当我在Linux中部署相同时,Billing继续按钮不起作用.
当我在输入细节后点击"继续"时,我在萤火虫中看到了
http://www.domain.com/checkout/onepage/saveBilling/ 200好的
它停留在同一页面......
然后,当我在apache error_log中检查时,我发送错误消息:
[错误]文件不存在:/ home/docs/public_html/checkout,referer:http://www.domain.com/checkout/onepage/
我不知道为什么要去/ home/docs/public_html/checkout ???
我是否正确调试?你能帮我解决一下这个问题....感谢和问候ecomse