这是我的代码。如何从网页返回的数据中提取手机号码?from bs4 import BeautifulSoupimport requestsr = requests.get("https://www.medindia.net/patients/doctor_search/dr-amiya-obstetrics-and-gynaecology-north-lakhimpur-assam-231775-1.htm")soup = BeautifulSoup(r.text,'lxml')data= soup.find('div',class_='col-xs-12')h3 = data.find('h3')print h3.textp = data.find('p')print p.textr = data.find('span')print r.text
添加回答
举报
0/150
提交
取消