html - Scrapping using codeigniter and i need title and custom link -


<div id="archive_content_block">     <div class="row">        <div class="col-md-6 col-sm-6">          <div class="archive_cat_caption">             <h4>অর্থনীতি</h4>         </div>       <ul>         <li><i class="fa fa-square-o"></i>&nbsp;           <a href="http://67.227.189.112/~rtvnews24/economy/2126/বাধ্যতামূলক-করারোপের-প্রস্তাব-অর্থমন্ত্রীর">          <font style="color:rgb(33, 33, 33)">বাধ্যতামূলক করারোপের প্রস্তাব অর্থমন্ত্রীর</font>         </a>       </li>      </ul>   </div>   <div class="col-md-6 col-sm-6">      <div class="archive_cat_caption">         <h4>খেলাধুলা</h4>      </div>      <ul>         <li><i class="fa fa-square-o"></i>&nbsp;<a href="http://67.227.189.112/~rtvnews24/sports/2096/অস্ট্রেলিয়া-রেকর্ড"><font style="color:rgb(33, 33, 33)">অস্ট্রেলিয়া রেকর্ড</font></a></li>       </ul>   </div> </div> </div> 

[this scrapping html page code]

here have function scrapping title , link. not work

   public function get_dom()     {        $this->load->library('scraping');     $date = date('y/m/d');  // custom date     $url = "http://67.227.189.112/~rtvnews24/archive/$date";  //my link     $html = file_get_html($url);     $row =   $html->find('div.archive_content_block',0);  // select content      foreach($row->find('div.archive_cat_caption', 0) $title) {       echo $title->find('h4', 0)->plaintext.'</br>'; //title          foreach($row->find('ul',0) $link) {           echo $link->find('li',0)->find('a', 0)->href.'</br>'; //link             }      }   } 

here try title , link. please me. in advance


Comments

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -