1
0
Fork 0
forked from blallo/rss-bridge
rss-bridge/bridges/ArstechnicaBridge.php

31 lines
760 B
PHP
Raw Normal View History

2016-08-02 14:24:54 +02:00
<?php
class ArstechnicaBridge extends FeedExpander {
2016-08-02 14:24:54 +02:00
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";
2016-08-02 14:24:54 +02:00
protected function parseItem($item){
$item = parent::parseItem($item);
2016-08-02 14:24:54 +02:00
$html = $this->getSimpleHTMLDOMCached($item['uri']);
if(!$html){
$item['content'] .= '<p>Requesting full article failed.</p>';
}else{
$item['content'] = $html->find('.article-guts', 0);
}
2016-08-02 14:24:54 +02:00
return $item;
}
public function collectData(){
$this->collectExpandableDatas('http://feeds.arstechnica.com/arstechnica/index/');
}
2016-08-02 14:24:54 +02:00
public function getCacheDuration() {
return 7200; // 2h
}
2016-08-02 14:24:54 +02:00
}