forked from blallo/rss-bridge
[TheOatMeal] Remove bridge
RSS feeds are provided on the main page at http://theoatmeal.com/
This commit is contained in:
parent
c0df82c303
commit
9e209608c8
1 changed files with 0 additions and 27 deletions
|
@ -1,27 +0,0 @@
|
|||
<?php
|
||||
class TheOatmealBridge extends FeedExpander{
|
||||
|
||||
const MAINTAINER = "Riduidel";
|
||||
const NAME = "The Oatmeal";
|
||||
const URI = "http://theoatmeal.com/";
|
||||
const CACHE_TIMEOUT = 7200; // 2h
|
||||
const DESCRIPTION = "Un petit site de dessins assez rigolos";
|
||||
|
||||
public function collectData(){
|
||||
$this->collectExpandableDatas('http://feeds.feedburner.com/oatmealfeed');
|
||||
}
|
||||
|
||||
protected function parseItem($newsItem) {
|
||||
$item = parent::parseItem($newsItem);
|
||||
|
||||
$articlePage = getSimpleHTMLDOMCached($item['uri']);
|
||||
$content = $articlePage->find('#comic', 0);
|
||||
if(is_null($content)) // load alternative
|
||||
$content = $articlePage->find('#blog', 0);
|
||||
|
||||
if(!is_null($content))
|
||||
$item['content'] = $content->innertext;
|
||||
|
||||
return $item;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue