>>> for link in soup.find_all(‘a‘):
... print(link.get(‘href‘))
#用于爬取a标签的链接
http://beautifulsoup.readthedocs.io/zh_CN/v4.4.0/
>>> for link in soup.find_all(‘a‘):
... print(link.get(‘href‘))
#用于爬取a标签的链接
http://beautifulsoup.readthedocs.io/zh_CN/v4.4.0/
原文:https://www.cnblogs.com/kangdong/p/8489532.html