使用PYTHON正则表达式如何将下面的src图片地址解析出来

<li class="WB_pic S_bg1 bigcursor"><img action-data="pic_id=4b7a8989jw1erzh4dniysj20zk0qoqtp" action-type="fl_pics" src="
http://ww1.sinaimg.cn/square/4b7a8989jw1erzh4dniysj20zk0qoqtp.jpg
" suda-uatrack="key=tblog_newimage_feed&value=image_feed_unfold:3841063343408532">n
<li class="WB_pic S_bg1 bigcursor"><img action-data="pic_id=4b7a8989jw1erzh52hcj0j20wb0qo44m" action-type="fl_pics" src="
http://ww4.sinaimg.cn/square/4b7a8989jw1erzh52hcj0j20wb0qo44m.jpg
" suda-uatrack="key=tblog_newimage_feed&value=image_feed_unfold:3841063343408532">n
<li class="WB_pic S_bg1 bigcursor"><img action-data="pic_id=4b7a8989jw1erzh552ld7j20zk0qoazg" action-type="fl_pics" src="
http://ww4.sinaimg.cn/square/4b7a8989jw1erzh552ld7j20zk0qoazg.jpg
" suda-uatrack="key=tblog_newimage_feed&value=image_feed_unfold:3841063343408532">n
</img></li></img></li></img></li></img></li></img></li></img></li>,
最新回答
敲击岁月

2024-04-11 08:00:54

是煎蛋的么,下面是伪代码

import re


html = "你的网页代码"

pat = '[p|/]>\n*<img src="(.*?)"'

reslist = re.findall(pat, html, re.M)

for x in reslists:

    print x