コード例 #1
0
 function fetch_work_education()
 {
     $sub_link = '/about?section=overview&pnref=about';
     $crawler = new FacebookCrawler($this->profile . $sub_link, $this->current_cookie);
     $this->response = $this->response . '<br><b>Overview<b><br>';
     $categories = $crawler->getTextBetweenTags('<div class="_6a _5u5j _6b">', '', 0, '</li>');
     $i = 0;
     $fields = array(array());
     foreach ($categories as $c) {
         $c = '.' . $c;
         $titles = $crawler->getTextBetweenTagsInString($c, '<div class="_c24 _50f4">');
         $sub_titles = $crawler->getTextBetweenTagsInString($c, '<div class="_50f8 _50f3">');
         $title = $titles[0];
         $sub_title = $sub_titles[0];
         $title = $this->format($title);
         $this->response = $this->response . $title . '<br>';
         $fields[$i]['title'] = $crawler->stripAllLink($title);
         $sub_title = $this->format($sub_title);
         $this->response = $this->response . $sub_title . '<br>';
         $fields[$i]['value'] = $crawler->stripAllLink($sub_title);
         $i++;
     }
     $this->slack[3]['title'] = 'Overview';
     $this->slack[3]['color'] = '#FFFB00';
     $this->slack[3]['fields'] = $fields;
 }