import re
matchs=re.finditer(r'<dd>(.*?)</dd>',htmltext,re.S)
for match in matchs:
print(match.group(1))
匹配时指定re.S可以让点匹配所有字符,包括换行符
import re
matchs=re.finditer(r'<dd>(.*?)</dd>',htmltext,re.S)
for match in matchs:
print(match.group(1))
匹配时指定re.S可以让点匹配所有字符,包括换行符