是文档div

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_34069180/article/details/84958265
<Element div at 0x2133d077dc8>是文档div
<input name="mp" type="hidden" value="46">
selector.xpath('//input[@name="mp"]')#这里只关注第一个属性值
int(controls[0].attrib['value'])
pageNum = int(controls[0].attrib['value'])#此时获取整个列表的第一个元素的attrib值value,字符串转数字

猜你喜欢

转载自blog.csdn.net/qq_34069180/article/details/84958265
div