file_get_html($article_url) or $this->returnError('Could not request Nextgov: '.$article_url, 500);
+
+ $contents = $article->find('div.wysiwyg', 0)->innertext;
+ $contents = StripWithDelimiters($contents, '', '
');
+ $contents = StripWithDelimiters($contents, ''); //ad outer div
+ $contents = StripWithDelimiters($contents, '');
+
+ $item = new \Item();
+ $item->uri = $article_url;
+ $item->title = $article_title;
+ $item->author = $article_author;
+ $item->thumbnailUri = $article_thumbnail;
+ $item->timestamp = $article_timestamp;
+ $item->content = trim($contents);
+ $this->items[] = $item;
+ $limit++;
+ }
+ }
+
+ }
+
+ public function getName() {
+ return 'The Hacker News Bridge';
+ }
+
+ public function getURI() {
+ return 'https://thehackernews.com/';
+ }
+
+ public function getCacheDuration() {
+ return 3600; //1 hour
+ }
+}
\ No newline at end of file
diff --git a/bridges/ZDNetBridge.php b/bridges/ZDNetBridge.php
index 4267b983..79924aa0 100644
--- a/bridges/ZDNetBridge.php
+++ b/bridges/ZDNetBridge.php
@@ -6,8 +6,8 @@ class ZDNetBridge extends BridgeAbstract {
$this->maintainer = 'ORelio';
$this->name = $this->getName();
$this->uri = $this->getURI();
- $this->description = 'Returns the newest articles.';
- $this->update = '2016-07-18';
+ $this->description = 'Technology News, Analysis, Comments and Product Reviews for IT Professionals.';
+ $this->update = '2016-07-20';
$this->parameters[] =
// http://www.zdnet.com/zdnet.opml
@@ -261,7 +261,7 @@ class ZDNetBridge extends BridgeAbstract {
$thumbnail = $article->find('meta[itemprop=image]', 0);
if (is_object($thumbnail))
$thumbnail = $thumbnail->content;
- else $thumbnail = 'http://zdnet1.cbsistatic.com/fly/bundles/zdnetcss/images/logos/logo-192x192.png';
+ else $thumbnail = '';
$contents = $article->find('article', 0)->innertext;
foreach (array(
@@ -277,8 +277,17 @@ class ZDNetBridge extends BridgeAbstract {
}
$contents = StripWithDelimiters($contents, '