我想一起从两个随后的span标签中提取文本值。
<span class="research-details-footer-key">Bathrooms:</span>, <span>1</span>
答案 0 :(得分:-2)
import re
pat = re.compile('>([\w:]*)<')
value = '<span class="research-details-footer-key">Bathrooms:</span>, <span>1</span>'
print(pat.findall(value))
output : ['Bathrooms:', '1']