mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-05 02:24:35 +02:00
[bridges] Rename bridges that are missing 'Bridges'
The word 'Bridge' is a requirement for the filename and class name. Also documented here (now): https://github.com/rss-bridge/rss-bridge/wiki/how-to-create-a-new-bridge
This commit is contained in:
parent
07f664b2fa
commit
237a26e4ff
4 changed files with 4 additions and 4 deletions
43
bridges/Les400CulsBridge.php
Normal file
43
bridges/Les400CulsBridge.php
Normal file
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
define("SEXE", "http://sexes.blogs.liberation.fr");
|
||||
define("SEXE_FEED", "http://sexes.blogs.liberation.fr/feeds/");
|
||||
|
||||
class Les400CulsBridge 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 = array();
|
||||
$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
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue