2014-02-20 08:43:14 +01:00
|
|
|
<?php
|
2016-08-24 19:06:07 +02:00
|
|
|
class Les400CulsBridge extends RssExpander{
|
2014-02-20 08:43:14 +01:00
|
|
|
|
2016-08-30 11:23:55 +02:00
|
|
|
const MAINTAINER = "unknown";
|
|
|
|
const NAME = "Les 400 Culs";
|
|
|
|
const URI = "http://sexes.blogs.liberation.fr/";
|
|
|
|
const DESCRIPTION = "La planete sexe vue par Agnes Girard via rss-bridge";
|
2015-11-03 23:28:44 +01:00
|
|
|
|
|
|
|
|
2016-08-25 01:24:53 +02:00
|
|
|
public function collectData(){
|
2016-08-30 11:23:55 +02:00
|
|
|
$this->collectExpandableDatas(self::URI.'feeds/');
|
2014-02-20 08:43:14 +01:00
|
|
|
}
|
2016-08-25 17:11:49 +02:00
|
|
|
|
2015-03-18 17:42:55 +01:00
|
|
|
protected function parseRSSItem($newsItem) {
|
2016-08-22 18:55:59 +02:00
|
|
|
$item = array();
|
|
|
|
$item['title'] = trim((string) $newsItem->title);
|
2016-08-24 20:19:30 +02:00
|
|
|
$this->debugMessage("browsing item ".var_export($newsItem, true));
|
2015-03-18 17:42:55 +01:00
|
|
|
if(empty($newsItem->guid)) {
|
2016-08-22 18:55:59 +02:00
|
|
|
$item['uri'] = (string) $newsItem->link;
|
2015-03-18 17:42:55 +01:00
|
|
|
} else {
|
2016-08-22 18:55:59 +02:00
|
|
|
$item['uri'] = (string) $newsItem->guid;
|
2015-03-18 17:42:55 +01:00
|
|
|
}
|
|
|
|
// now load that uri from cache
|
2016-08-24 20:19:30 +02:00
|
|
|
$this->debugMessage("now loading page ".$item['uri']);
|
2016-08-28 19:38:34 +02:00
|
|
|
// $articlePage = $this->get_cached($item['uri']);
|
2015-03-18 17:42:55 +01:00
|
|
|
|
|
|
|
// $content = $articlePage->find('.post-container', 0);
|
2016-08-22 18:55:59 +02:00
|
|
|
$item['content'] = (string) $newsItem->description;
|
|
|
|
$item['author'] = (string) $newsItem->author;
|
|
|
|
$item['timestamp'] = $this->RSS_2_0_time_to_timestamp($newsItem);
|
2015-03-18 17:42:55 +01:00
|
|
|
return $item;
|
2014-02-20 08:43:14 +01:00
|
|
|
}
|
|
|
|
public function getCacheDuration(){
|
|
|
|
return 7200; // 2h hours
|
|
|
|
}
|
|
|
|
}
|