摘要: 1.提取出‘[ ]’里的数字,比如在爬取煎蛋网妹子图时需要去掉'[ ]'提取出里面的数字,也就是页码,这里用到的是python里的re模块的sub方法。 span_tag = sou.find_all('span', attrs={'class': 'current-comment-page'})[ 阅读全文
posted @ 2017-06-17 17:44 SnailsH 阅读(8) 评论(0) 推荐(0)