我想获取HTML文档中的特定行
vallign行和vallign属性如下:
以下是HTML表的一个片段:
<table>
<tbody>
<tr bgcolor="#f01234" valign="top">
<!--- td's follow ... -->
</tr>
<tr bgcolor="#c01234" valign="top">
<!--- td's follow ... -->
</tr>
</tbody>
</table>
我很快就看了BS's documentation。不清楚传递给findAll什么参数来匹配我想要的行。在
有人知道什么样的tp bass to findAll()来匹配我想要的行吗?在
有点像
不要使用regex解析html。使用html解析器
这将从您的html中提取所有匹配的tr元素,您可以对它们做进一步的操作,如更改文本、属性值、提取、进一步搜索。。。在
必修环节:
RegEx match open tags except XHTML self-contained tags
相关问题 更多 >
编程相关推荐