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