python抓取数据的时候,我使用了beautifulsoup,想抓表格。
其中只想抓取
soup.find_all("tr",attrs={"class":re.compile(r"tr_2|''")}),标签没有class属性,想问一下要怎么写正则表达式呢?
谢谢
python抓取数据的时候,我使用了beautifulsoup,想抓表格。
其中只想抓取
r"(?<=href=\").+?(?=\")|(?<=href=\').+?(?=\')"
参考自:
python 简单的爬虫获取网站信息 http://www.data.5helpyou.com/article137.html