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; } } }
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; } } */ }
public function __construct($config) { $config = array('title_pattern' => '.articleHead h1', 'content_pattern' => 'article-main-body', 'remove_pattern' => 'figcaption', 'imgavatar_pattern' => '.imageContainer'); parent::__construct($config); }
protected function beforeGetContent() { parent::beforeGetContent(); //$this->html->find(".art_content img",0)->src = 'http://bongdaso.com'.$this->getImageThumb(); }
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); }