PUS*_*COM 5 html css php wordpress css-selectors
我使用WP Web Scraper从以下链接获取标题:http: //lpse.acehtenggarakab.go.id/eproc/lelang/view/1316330
标题是:PENGAWASAN/SUPERVISI KEGIATAN FISIK TAHUN 2016
标题位于<td>
带有属性的html标记内class="horizLine"
(它位于<tr>
此html 的第二行(html标记)<table>
,包含68行).
我的WP Web Scraper shorthcode是:
[wpws url="http://lpse.dephub.go.id/eproc/lelang/view/33737114" selector=".horizLine"]
Run Code Online (Sandbox Code Playgroud)
但它不起作用.
我的问题:
如何在selector
我的短代码属性中定位此标题,而其他人则忽略了?
我认为您需要在短代码属性中添加更多元素selector
,因为显示的 html 源代码是:
<tr>\n <td width="150" class="TitleLeft">Kode Lelang</td>\n <td colspan="3" class="horizLine"><b>1316330</b></td>\n</tr>\n<tr>\n <td class="TitleLeft">Nama Lelang </td>\n <td colspan="3" class="horizLine">\n <b>\n <strong>PENGAWASAN/SUPERVISI KEGIATAN FISIK TAHUN 2016</strong>\n </b>\n </td>\n</tr>\n<tr> \xe2\x80\xa6\n
Run Code Online (Sandbox Code Playgroud)\n\n这是针对标题的解决方案selector="tr:nth-child(2) td.horizLine b strong"
:
[wpws url="http://lpse.dephub.go.id/eproc/lelang/view/33737114" selector="tr:nth-child(2) td.horizLine b strong"]\n
Run Code Online (Sandbox Code Playgroud)\n\n我的:nth-child(2)
目标是第二个<tr>
html 元素。
归档时间: |
|
查看次数: |
62 次 |
最近记录: |