From 2f3bddb2915012de132a1b512dcf16105bff8180 Mon Sep 17 00:00:00 2001 From: ORelio Date: Tue, 19 Jul 2016 19:37:06 +0200 Subject: [PATCH] [Numerama] Use proxied file_get_html --- bridges/NumeramaBridge.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bridges/NumeramaBridge.php b/bridges/NumeramaBridge.php index f5b24eaa..e1829c31 100644 --- a/bridges/NumeramaBridge.php +++ b/bridges/NumeramaBridge.php @@ -7,7 +7,7 @@ class NumeramaBridge extends BridgeAbstract{ $this->name = 'Numerama'; $this->uri = 'http://www.numerama.com/'; $this->description = 'Returns the 5 newest posts from Numerama (full text)'; - $this->update = '2015-10-12'; + $this->update = '2016-07-19'; } @@ -19,9 +19,9 @@ class NumeramaBridge extends BridgeAbstract{ return $string; } - function NumeramaExtractContent($url) + function NumeramaExtractContent($bridge, $url) { - $html2 = file_get_html($url); + $html2 = $bridge->file_get_html($url); $text = $html2->find('section[class=related-article]', 0)->innertext = ''; // remove related articles block $text = ''; // add post picture $text = $text.$html2->find('article[class=post-content]', 0)->innertext; // extract the post @@ -38,7 +38,7 @@ class NumeramaBridge extends BridgeAbstract{ $item->author = NumeramaStripCDATA($element->find('dc:creator', 0)->innertext); $item->uri = NumeramaStripCDATA($element->find('guid', 0)->plaintext); $item->timestamp = strtotime($element->find('pubDate', 0)->plaintext); - $item->content = NumeramaExtractContent($item->uri); + $item->content = NumeramaExtractContent($this, $item->uri); $this->items[] = $item; $limit++; }