1
0
Fork 0
forked from blallo/rss-bridge
rss-bridge/bridges/ArstechnicaBridge.php
Pierre Mazière 8f58c9f86b [bridges] make them FeedExpander
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-09-17 19:37:39 +02:00

30 lines
760 B
PHP

<?php
class ArstechnicaBridge extends FeedExpander {
const MAINTAINER = "prysme";
const NAME = "ArstechnicaBridge";
const URI = "http://arstechnica.com";
const DESCRIPTION = "The PC enthusiast's resource. Power users and the tools they love, without computing religion";
protected function parseItem($item){
$item = parent::parseItem($item);
$html = $this->getSimpleHTMLDOMCached($item['uri']);
if(!$html){
$item['content'] .= '<p>Requesting full article failed.</p>';
}else{
$item['content'] = $html->find('.article-guts', 0);
}
return $item;
}
public function collectData(){
$this->collectExpandableDatas('http://feeds.arstechnica.com/arstechnica/index/');
}
public function getCacheDuration() {
return 7200; // 2h
}
}