Python:提取html中所有URL链接 第一步:搜索<a>标签 第二步:提取<a>标签中href的内容 以CSDN首页为例,代码如下: >>>importrequests>>>r=requests.get("https://www.csdn.net")>>>demo=r.text>>>frombs4importBeautifulSoup>>>soup=BeautifulSoup(demo,"html.parser")>>>forlinkinsoup.find_all('a'):pr...