public function getCategoryItemUrl() { $data = parent::getCategoryItemUrl(); $sourceurl = parent::getUrl(); $arr = parse_url($sourceurl); $baseurl = $arr['scheme'] . "://" . $arr['host']; if (!$data) { $this->_category_item_url = array(); $filter = '//ul[@id="sjina_B01_05"]//div[@class="s3"]/a/@href||2'; $tmp = $this->_getRegexpInfo($filter, $this->getContent()); foreach ($tmp 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; } } } else { 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; } } } return $this->_category_item_url; }
public function getCategoryItemUrl() { $arrs = parent::getCategoryItemUrl(); $baseurl = trim($this->getCategoryItemArea()); $this->_category_item_url = array(); foreach ($arrs as $k => $v) { $this->_category_item_url[$k] = trim($v); } return $this->_category_item_url; }
public function getCategoryItemUrl() { $data = parent::getCategoryItemUrl(); // $sourceurl = parent::getUrl(); // // $arr = parse_url($sourceurl); // $baseurl = $arr['scheme']."://".$arr['host']; $baseurl = 'http://www.leju.com/?mod=api_projectlist&type=foucs_equan&aid='; foreach ($data as $k => $v) { $tmp = parse_url($v); parse_str($tmp['query'], $parr); $this->_category_item_url[$k] = $baseurl . $parr['aid'] . '&city=' . $parr['hsite'] . '&hid=' . $parr['hid']; } return $this->_category_item_url; }
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; }