[bridges] Change all bridges to use BridgeAbstract with getSimpleHTMLDOMCached

This commit is contained in:
logmanoriginal 2016-09-10 19:11:09 +02:00
parent 9f2dd48684
commit 2eec89ab27
21 changed files with 27 additions and 27 deletions

View file

@ -17,7 +17,7 @@ class NumeramaBridge extends FeedExpander {
}
private function ExtractContent($url){
$article_html = $this->get_cached($url) or $this->returnServerError('Could not request Numerama: '.$url);
$article_html = $this->getSimpleHTMLDOMCached('Could not request Numerama: '.$url);
$contents = $article_html->find('section[class=related-article]', 0)->innertext = ''; // remove related articles block
$contents = '<img alt="" style="max-width:300px;" src="'.$article_html->find('meta[property=og:image]', 0)->getAttribute('content').'">'; // add post picture
return $contents . $article_html->find('article[class=post-content]', 0)->innertext; // extract the post