提问人:2manov 提问时间:2/5/2019 更新时间:2/5/2019 访问量:107
如何从多个html中解析电话号码?
How to parse phone numbers from multiple html's?
问:
我不知道如何解析来自多个 html 的电话号码,因为它们在 span 类中具有不同的名称。我只有一个想法,那就是解析完整的html文本并使用正则表达式获取电话号码,但是我有大约1000个html,我认为它会花费很多时间
我知道如何使用 BeautifulSoup 解析单个 html 页面
r = requests.get(Base_URL)
soup = BeautifulSoup(r.content)
print soup.find("div", class_="some_class").find("span", class_="phone number").text
答: 暂无答案
评论