我想提取在data-src后面的地址,始终把data-src也提取出来了
1条回答 默认 最新
- RE_ABANDON 2021-10-18 16:41关注
这样就行
import re html_str = 'AAAAAdata-src=123' local = re.findall(r'data-src=(.*)', html_str) print(local[0])
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
这样就行
import re
html_str = 'AAAAAdata-src=123'
local = re.findall(r'data-src=(.*)', html_str)
print(local[0])