diff --git a/bridges/VarietyBridge.php b/bridges/VarietyBridge.php new file mode 100644 index 00000000..a2e61700 --- /dev/null +++ b/bridges/VarietyBridge.php @@ -0,0 +1,30 @@ +collectExpandableDatas('http://feeds.feedburner.com/variety/headlines', 15); + } + + protected function parseItem($newsItem){ + $item = parent::parseItem($newsItem); + // $articlePage gets the entire page's contents + $articlePage = getSimpleHTMLDOM($newsItem->link); + + // Remove Script tags + foreach($articlePage->find('script') as $script_tag) { + $script_tag->remove(); + } + $article = $articlePage->find('div.c-featured-media', 0); + $article = $article . $articlePage->find('.c-content', 0); + + $item['content'] = $article; + + return $item; + } +}