xpath - 使用 xpath 解析产品价格
问题描述
我在从这个页面 ironflask.com/products/14-oz-wide-mouth-with-straw-lid?variant=31659847057496 解析产品价格时遇到问题
<div class="p-price">
Price:
<dl class="price" data-price="">$17.95</dl>
</div>
我试过了://div[class='p-price']/dl[class='price']
似乎//div[class='p-price']/dl[class='price']/text()
没有任何效果
解决方案
推荐阅读
- arrays - 类型末尾的双问号是什么意思?
- sql - ms sql server如何检查表是否有“id”列并在“id”存在时计算行数
- cmake - 使用支持所有 vcpkg/apt-get/brew 的 cmake 添加 FreeType 依赖项
- javascript - Star WebPRNT 钱箱
- mysql - Django - libssl.1.1.dylib 库未加载错误 - 为什么会发生这种情况?
- java - 将当前线程休眠特定时间
- python - OneHotEncoder : __init__() 得到了一个意外的关键字参数“categorical_features”
- linux - 性能回溯在 Pin 中不可重现
- laravel - Laravel:附加属性会导致 n+1 问题吗?
- fortran - Fortran 中的表格输出,对意外值具有鲁棒性?