火车采集器软件交流官方论坛

 找回密码
 加入会员
搜索
火车采集器V9版免费下载火车浏览器 - 可视采集,万能群发,全自动脚本工具
查看: 3728|回复: 5

这种代码的正则表达式应该怎么写呢 ??

[复制链接]
发表于 2012-7-14 17:40:16 | 显示全部楼层 |阅读模式
主图部分的代码

<tr id="prodImageContainer">
        <td id="prodImageCell" height="300" width="300"><a href="/gp/reader/B003L0QR3K/ref=sib_dp_kd#reader-link" onclick="if (typeof(SitbReader) != 'undefined') { SitbReader.LightboxActions.openReader('sib_dp_kd'); return false; }"><img onload="if (typeof uet == 'function') { if(typeof setCSMReq=='function'){setCSMReq('af');setCSMReq('cf');}else{uet('af');uet('cf');amznJQ.completedStage('amznJQ.AboveTheFold');} } " src="http://ecx.images-amazon.com/images/I/413gxoBHErL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA278_PIkin4,BottomRight,-67,22_AA300_SH20_OU01_.jpg" id="prodImage"  width="300" height="300"  border="0" alt="Reflections of Grey (Book Three of the Alexis Stanton Chronicles)" onmouseover="" /></a><div id="prodImageCellInner" style="position: relative; height:0px;"><!--Comment for IE as it is empty div--></div></td>
     </tr>



你好 我要提取的是这个图片:src="http://ecx.images-amazon.com/images/I/413gxoBHErL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA278_PIkin4,BottomRight,-67,22_AA300_SH20_OU01_.jpg"

用正则表达式 我是这样子写的
左边
<img onload="if (typeof uet == 'function') { if(typeof setCSMReq=='function'){setCSMReq('af');setCSMReq('cf');}else{uet('af');uet('cf');amznJQ.completedStage('amznJQ.AboveTheFold');} } " src="[参数1].jpg"

右边
<img src="images/[参数1].jpg" />

不过还是不行 麻烦帮我看下 要怎么写。。。谢谢
发表于 2012-7-15 09:16:22 | 显示全部楼层
左边
  1. src="[参数].jpg
复制代码
发表于 2012-7-17 09:22:22 | 显示全部楼层
没懂什么意思。。。
发表于 2012-7-17 10:06:37 | 显示全部楼层
左边正则只能使用[参数],右边组合结果可使用参数1,参数2等按照顺序获取正则里的参数
发表于 2012-7-21 12:56:28 | 显示全部楼层
左边
<img onload="if (typeof uet == 'function') { if(typeof setCSMReq=='function'){setCSMReq('af');setCSMReq('cf');}else{uet('af');uet('cf');amznJQ.completedStage('amznJQ.AboveTheFold');} } " src="[参数].jpg"

右边
[参数1]

 楼主| 发表于 2012-7-16 10:07:36 | 显示全部楼层
303718 发表于 2012-7-15 09:16
左边

你好 这样子的话 太宽泛了 采集下来的话 都是太多的图片路径了 因为源代码里面 有 src 开头的图片也是很多的 。。。
您需要登录后才可以回帖 登录 | 加入会员

本版积分规则

企业微信|手机版|Archiver|火车采集器官方站 ( 皖ICP备06000549 )

GMT+8, 2026-4-24 09:53

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表