public function getSourceBrandName() { $str = parent::getSourceBrandName(); $arr = explode("(", $str); $this->_sourceBrandName = isset($arr[0]) ? $arr[0] : ""; return $this->_sourceBrandName; }
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 getCategoryItemUrl() { $data = parent::getCategoryItemUrl(); $sourceurl = parent::getUrl(); $arr = parse_url($sourceurl); $baseurl = $arr['scheme'] . "://" . $arr['host']; foreach ($data as $k => $v) { if (strstr($v, 'javascript')) { $v = $sourceurl; } if (!strstr($v, "http")) { $this->_category_item_url[$k] = $baseurl . $v; } else { $this->_category_item_url[$k] = $v; } } $this->_category_item_url[] = $sourceurl; return $this->_category_item_url; }
public function getSourceBrandID() { $str = parent::getSourceBrandID(); if (!$str) { $filter = '//ul[@class="cont02 mb10"]/li[2]/a/text()||1'; $this->_sourceBrandID = $this->_getRegexpInfo($filter, $this->getContent()); } return $this->_sourceBrandID; }
public function getTitle() { $str = parent::getTitle(); $this->_title = trim(str_replace(array("\r\n"), "", $str)); return $this->_title; }
public function getName() { $str = parent::getName(); $p = '/(.*?)的/'; preg_match($p, $str, $out); $this->_name = isset($out[1]) ? $out[1] : ""; return $this->_name; }
public function getSales() { $arr = parent::getSales(); $this->_sales = ""; if ($arr) { $this->_sales = count($arr); } else { $this->_sales = ""; } return $this->_sales; }
public function getName() { $data = parent::getName(); if (!$data) { $filter = '//li[@class="site-topsearch"][1]/a/text()||2'; $this->_name = $this->_getRegexpInfo($filter, $this->getContent()); } return $this->_name; }
public function getProductID() { $str = parent::getUrl(); if ($str) { $tmp = parse_url($str); parse_str($tmp['query'], $parr); $this->_productID = $parr['hid']; } return $this->_productID; }