public function getProductID() { $str = parent::getProductID(); $p = '/房源编号:(\\d+) /'; preg_match($p, $str, $out); $this->_productID = isset($out[1]) ? $out[1] : ""; return $this->_productID; }
public function getProductID() { $str = parent::getProductID(); if (!$str) { $sourceurl = parent::getUrl(); $arr = parse_url($sourceurl); $this->_productID = $arr['host'] . '_' . $str; } return $this->_productID; }
public function getProductID() { $str = parent::getProductID(); $sourceurl = parent::getUrl(); $data = parent::getPriceUrl(); $arr = parse_url($sourceurl); $baseurl = $arr['host']; $p = '/esf.(\\w+).fang/'; preg_match($p, $baseurl, $out); $s = isset($out[1]) ? $out[1] : ""; $this->_productID = $s . '-' . $str; return $this->_productID; }
public function getProductID() { $str = parent::getProductID(); if (!$str) { $filter = '//li[@class="site-topsearch"]/a[@class="current"]/text()||1'; $str = $this->_getRegexpInfo($filter, $this->getContent()); } if (!$str) { $filter2 = '//div[@class="list_jingji"]//div[@class="item"]/a[@class="hover"]/text()||1'; $str = $this->_getRegexpInfo($filter2, $this->getContent()); } $sourceurl = parent::getUrl(); $arr = parse_url($sourceurl); $baseurl = $arr['host']; $p = '/(\\w+).esf/'; preg_match($p, $baseurl, $out); $bs = isset($out[1]) ? $out[1] : ""; $this->_productID = $bs . '-' . $str; return $this->_productID; }
public function getProductID() { $str = parent::getProductID(); if (!$str) { $filter = '//input[@id="jjrmanagername"]/@value||1'; $this->_sourceSellerID = $this->_getRegexpInfo($filter, $this->getContent()); } return $this->_sourceSellerID; }