Beispiel #1
0
 /**
  * 私有方法主爬虫
  */
 protected final function runUsersCrawler()
 {
     $crawler = new MainCrawl();
     $crawler->getData();
     $this->dataArray = $crawler->analysisUserFollers();
     $this->store();
 }
 protected function runGetDetailsCrawler()
 {
     $crawler = new MainCrawl();
     $crawler->getData();
     $this->dataArray = $crawler->analysisCrawler();
     if (DEBUG == true) {
         echo 'the result is: ';
         var_dump($this->dataArray);
     }
     if (!$this->dataArray) {
         echo '404 not found';
         return false;
     }
     // 确认是否网络通畅
     if ($this->dataArray['username'] == null) {
         echo 'bad http connect';
         return false;
     }
     $this->store();
     // 释放内存
     $crawler = null;
 }