这是我的代码。如何从网页返回的数据中提取手机号码?
from bs4 import BeautifulSoup
import requests
r = 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.text
p = data.find('p')
print p.text
r = data.find('span')
print r.text
相关分类