mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-05 02:24:35 +02:00
[bridges] Change all bridges to use BridgeAbstract with getSimpleHTMLDOMCached
This commit is contained in:
parent
9f2dd48684
commit
2eec89ab27
21 changed files with 27 additions and 27 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue