xpath與正則表達式的區別

轉載自https://www.cnblogs.com/dyfblog/p/6073069.html xpath獲取URL列表: 以博客園首頁爲例,如果我們需要的數據是文章 的 url 列表,最好使用 XPath,見圖 #coding:utf8from lxml import etreeimport requestsurl = 'http://www.cnblogs.com/'response =
相關文章
相關標籤/搜索