163tom 发表于 2010-6-4 08:36:59

shopex多图采集 正则如何写 自定义的正则无法取出图片链接 求助

这是后车头默认的规则取内容(?<content>[\s\S]*?), 我现在想取第一张大图的图片地址,第二张大图的图片地址,第三张大图的图片地址,大于3张以上的图片,则取到第四个图片地址。如何写规则呢,,正则如何定位第一张big大图出现的为止,如何定位第二张big大图出现的位置?


以下为4张多图商品显示区域   需要截取big大图 4张有时候商品又只有3张大图,该如何写规则呢



<div class="goods-detail-pic-thumbnail pics"><table> <tr><td class='current' img_id='508'> <div class='uparrow'></div> <a href="?product-88-508-viewpic.html" target="_blank" imgInfo="{small:'http://www.kk580.com/images/goods/20100511/5b549246f5bf80e3.jpg',big:'http://www.kk580.com/images/goods/20100511/b18177e7ad40ba53.jpg'}"> <img src="http://www.kk580.com/images/goods/20100511/1f8f0e984b734a76.jpg" alt='008简装电脑耳机' width='55' height='55'/> </a> </td><td img_id='509'> <div class='uparrow'></div> <a href="?product-88-509-viewpic.html" target="_blank" imgInfo="{small:'http://www.kk580.com/images/goods/20100511/7eb31147b9dfc781.jpg',big:'http://www.kk580.com/images/goods/20100511/518d198701bd18b7.jpg'}" > <img src="http://www.kk580.com/images/goods/20100511/ef2d82c3797f9595.jpg" alt='008简装电脑耳机' width='55' height='55'/> </a> </td><td img_id='510'> <div class='uparrow'></div> <a href="?product-88-510-viewpic.html" target="_blank" imgInfo="{small:'http://www.kk580.com/images/goods/20100511/02c6ea984537f4c6.jpg',big:'http://www.kk580.com/images/goods/20100511/a594ce94ce362003.jpg'}" > <img src="http://www.kk580.com/images/goods/20100511/e216308cfc8c141c.jpg" alt='008简装电脑耳机' width='55' height='55'/> </a> </td><td img_id='511'> <div class='uparrow'></div> <a href="?product-88-511-viewpic.html" target="_blank" imgInfo="{small:'http://www.kk580.com/images/goods/20100511/b4519e4924c2b344.jpg',big:'http://www.kk580.com/images/goods/20100511/2d5c72011228f3b6.jpg'}" > <img src="http://www.kk580.com/images/goods/20100511/5f2d080216091d31.jpg" alt='008简装电脑耳机' width='55' height='55'/> </a> </td></tr> </table></div> </td> <td width='5%' class='scrollarrow toright' title='向右'>&nbsp; </td> </tr> </table> <a href="?product-88-508-viewpic.html" target="_blank" onclick='_open(this.href);return false;'> <img src="statics/transparent.gif" alt="查看大图" style="width:101px;height:26px;background-image:url(statics/icons.gif);background-repeat:no-repeat;background-position:0 -121px;" /> </a> <script>
      window


以下为4张多图商品显示区域

<div class="goods-detail-pic-thumbnail pics"><table> <tr><td class='current' img_id='2641'> <div class='uparrow'></div> <a href="?product-603-2641-viewpic.html" target="_blank" imgInfo="{small:'http://www.kk580.com/images/goods/20090720/0ef503699cf70faf.jpg',big:'http://www.kk580.com/images/goods/20090720/8f6cc6efbc30be0e.jpg'}"> <img src="http://www.kk580.com/images/goods/20090720/24eb5087e02608c7.jpg" alt='USB伸缩延长线' width='55' height='55'/> </a> </td><td img_id='2639'> <div class='uparrow'></div> <a href="?product-603-2639-viewpic.html" target="_blank" imgInfo="{small:'http://www.kk580.com/images/goods/20090720/c09984d16c4ea8e4.jpg',big:'http://www.kk580.com/images/goods/20090720/f187c3b7058bec17.jpg'}" > <img src="http://www.kk580.com/images/goods/20090720/a00d87631b31b5d1.jpg" alt='USB伸缩延长线' width='55' height='55'/> </a> </td><td img_id='2640'> <div class='uparrow'></div> <a href="?product-603-2640-viewpic.html" target="_blank" imgInfo="{small:'http://www.kk580.com/images/goods/20090720/57ed7ab621a2dfdc.jpg',big:'http://www.kk580.com/images/goods/20090720/c6dc74804064f7a1.jpg'}" > <img src="http://www.kk580.com/images/goods/20090720/7333e746b6255f78.jpg" alt='USB伸缩延长线' width='55' height='55'/> </a> </td></tr> </table></div> </td> <td width='5%' class='scrollarrow toright' title='向右'>&nbsp; </td> </tr> </table> <a href="?product-603-2641-viewpic.html" target="_blank" onclick='_open(this.href);return false;'> <img src="statics/transparent.gif" alt="查看大图" style="width:101px;height:26px;background-image:url(statics/icons.gif);background-repeat:no-repeat;background-position:0 -121px;" /> </a> <script>
      window

xzl08 发表于 2011-11-16 12:02:29

你这个估计是无法完成了~~

孤独天空 发表于 2012-5-15 17:44:28

怎么解决了呢。都没人回复。我也碰到这个问题。采集多图片都搞不定

iiwork 发表于 2012-4-29 10:38:47

这个其实很好解决

hawks1 发表于 2012-5-21 12:05:12

我也遇到这样的问题!我需要在一个标签,采集多个 不同<div>里的图片, 譬如4大图, 5大图,这样,暂时想不到怎样弄?

it866 发表于 2012-4-24 20:06:33

是呀这个问题我一直不知道怎么做

ayiliut 发表于 2012-7-6 09:43:31

如何定位第二张big大图出现的位置?
这是个问题。。。
页: [1]
查看完整版本: shopex多图采集 正则如何写 自定义的正则无法取出图片链接 求助