某个资源站倒闭了,但是以前采集了很多他的资源,导致现在很多图片都不显示了.再以后的采集过程中不希望所有的图片都被重新替换,怎么才能只更新这个倒闭了的资源站的图片呢.这里做个记录
找到applicationcommonmodelCollect.php这个文件的第839行左右(版本不同可能行数也不同).
if (strpos(',' . $config['uprule'], 'j')!==false && (substr($info["vod_pic"], 0, 4) == "http" || empty($info['vod_pic']) ) && $v['vod_pic']!=$info['vod_pic'] ) { $tmp = $this->syncImages($config['pic'],$v['vod_pic'],'vod'); $update['vod_pic'] = (string)$tmp['pic']; $msg =$tmp['msg']; }
替换为
if(strstr($info['vod_pic'],"vlwx.com")==true){ if (strpos(',' . $config['uprule'], 'j')!==true && (substr($info["vod_pic"], 0, 4) == "http" || empty($info['vod_pic']) ) && $v['vod_pic']!=$info['vod_pic'] ) { $tmp = $this->syncImages($config['pic'],$v['vod_pic'],'vod'); $update['vod_pic'] = (string)$tmp['pic']; $msg =$tmp['msg']; } }else{ if (strpos(',' . $config['uprule'], 'j')!==false && (substr($info["vod_pic"], 0, 4) == "http" || empty($info['vod_pic']) ) && $v['vod_pic']!=$info['vod_pic'] ) { $tmp = $this->syncImages($config['pic'],$v['vod_pic'],'vod'); $update['vod_pic'] = (string)$tmp['pic']; $msg =$tmp['msg']; } }
其中的的vlwx.com换成失效图片的关键词即可!
评论前必须登录!
注册