摘要: (一)日期和简介 date:2017/12/18 name:a标签href属性提取抛出异常list index out of range (二)问题详细说明: 以百度新闻页面为例: 1.node_list = html_etree.xpath("//a") # 获得a标签节点198个 2.遍历节点,获取href属性:a_href = node.xpath("./@href")[0]时 到1... 阅读全文
posted @ 2018-09-13 20:06 安迪9468 阅读(95) 评论(0) 推荐(0)