import requests from bs4 import BeautifulSoup import re url="http://yxzg.china.com.cn/node_1005530.html" resp=requests.get(url) resp.encoding='UTF-8' #print(resp.text) page=BeautifulSoup(resp.text,"html.parser") pic=page.find_all("img") for a in pic: print(a.get('src')) #print(pic)
python实践1
最新推荐文章于 2024-06-13 23:55:30 发布