Rss-Bridge/bridges/Les400Culs.php
Pierre Mazière bba216073c [bridges] remove useless 'update' property from all bridges
That's the source code manager job to keep this information
consistent

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2016-08-21 00:21:41 +02:00

44 lines
1.4 KiB
PHP

<?php
define("SEXE", "http://sexes.blogs.liberation.fr");
define("SEXE_FEED", "http://sexes.blogs.liberation.fr/feeds/");
class Les400Culs extends RssExpander{
public function loadMetadatas() {
$this->maintainer = "unknown";
$this->name = "Les 400 Culs";
$this->uri = "http://sexes.blogs.liberation.fr";
$this->description = "La planete sexe vue par Agnes Girard via rss-bridge";
}
public function collectData(array $param){
parent::collectExpandableDatas($param, SEXE_FEED);
}
protected function parseRSSItem($newsItem) {
$item = new Item();
$item->title = trim((string) $newsItem->title);
// $this->message("browsing item ".var_export($newsItem, true));
if(empty($newsItem->guid)) {
$item->uri = (string) $newsItem->link;
} else {
$item->uri = (string) $newsItem->guid;
}
// now load that uri from cache
// $this->message("now loading page ".$item->uri);
// $articlePage = str_get_html($this->get_cached($item->uri));
// $content = $articlePage->find('.post-container', 0);
$item->content = (string) $newsItem->description;
$item->author = (string) $newsItem->author;
$item->timestamp = $this->RSS_2_0_time_to_timestamp($newsItem);
return $item;
}
public function getCacheDuration(){
return 7200; // 2h hours
}
}