diff --git a/bridges/GizmodoBridge.php b/bridges/GizmodoBridge.php new file mode 100644 index 0000000..0fc80a5 --- /dev/null +++ b/bridges/GizmodoBridge.php @@ -0,0 +1,35 @@ +getSimpleHTMLDOMCached($item['uri']); + if(!$articleHTMLContent){ + $text = 'Could not load '.$item['uri']; + }else{ + $text = $articleHTMLContent->find('div.entry-content', 0)->innertext; + foreach($articleHTMLContent->find('pagespeed_iframe') as $element) { + $text .= '
link to a iframe (could be a video): '.$element->src.'
link to a iframe (could be a video): '.$element->src.'');
+ }
+
+ $item['content'] = $text;
+ return $item;
+ }
+
+ public function collectData(){
+ $this->collectExpandableDatas('http://feeds.gawker.com/gizmodo/full');
+ }
+
+ public function getCacheDuration(){
+ return 1800; // 30min
+ }
+}
diff --git a/bridges/GizmodoFRBridge.php b/bridges/GizmodoFRBridge.php
deleted file mode 100644
index e653130..0000000
--- a/bridges/GizmodoFRBridge.php
+++ /dev/null
@@ -1,48 +0,0 @@
-getSimpleHTMLDOM($url);
- if(!$articleHTMLContent){
- return 'Could not load '.$url;
- }
- $text = $articleHTMLContent->find('div.entry-thumbnail', 0)->innertext;
- $text = $text.$articleHTMLContent->find('div.entry-excerpt', 0)->innertext;
- $text = $text.$articleHTMLContent->find('div.entry-content', 0)->innertext;
- foreach($articleHTMLContent->find('pagespeed_iframe') as $element) {
- $text = $text.'
';
- }
-
- $text = strip_tags($text, '