Example #1
0
 protected function beforeGetContent()
 {
     parent::beforeGetContent();
     $modify = $this->html->find(".art_content img", 0);
     if ($modify) {
         $src = $this->getFirstImage();
         if (strpos($src, 'http') === false) {
             $modify->src = 'http://bongdaso.com' . $src;
         }
     }
 }
Example #2
0
 protected function beforeGetContent()
 {
     parent::beforeGetContent();
     //$modify = $this->html->find("#main-content .post-inner .entry img",0);
     foreach ($this->html->find("#main-content .post-inner .entry img") as $e) {
         $src = 'data-src';
         $e->src = $e->{$src};
     }
     foreach ($this->html->find("#main-content .post-inner .entry .wp-caption") as $e) {
         $e->style = '';
     }
     /* if($modify){
     			$src = $this->getFirstImage();
     			if(strpos($src, 'http')===false){
     				$modify->src = 'http://www.bongda.com.vn/'.$src;
     			}
     		} */
 }
Example #3
0
 public function __construct($config)
 {
     $config = array('title_pattern' => '.articleHead h1', 'content_pattern' => 'article-main-body', 'remove_pattern' => 'figcaption', 'imgavatar_pattern' => '.imageContainer');
     parent::__construct($config);
 }
Example #4
0
 protected function beforeGetContent()
 {
     parent::beforeGetContent();
     //$this->html->find(".art_content img",0)->src = 'http://bongdaso.com'.$this->getImageThumb();
 }
Example #5
0
 public function __construct($config)
 {
     $config = array('title_pattern' => 'h1 .instapaper_title', 'content_pattern' => '.m-article__entry-section', 'remove_pattern' => '.m-article__share-buttons|.video-wrap|.m-article__sources', 'imgavatar_pattern' => '.news-image');
     parent::__construct($config);
 }