from bs4 import BeautifulSoup
html = '
Hello, beautifulsoup4!
输出结果为:[
import re
string = 'This is a string with 12345 and 67890.' number_strings = re.findall('\d+', string) print(number_strings)
输出结果为:['12345', '67890']
上一篇:BeautifulSoup4更新标签内容后不会更新整个soup对象。
下一篇:Beautifulsoup4没有显示表格内容。