1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-17 22:02:09 +02:00

Merge branch 'master' into MangareaderBridge

This commit is contained in:
logmanoriginal
2016-01-21 21:20:17 +01:00
12 changed files with 112 additions and 16 deletions

View File

@@ -53,6 +53,16 @@ class DemoBridge extends BridgeAbstract{
public function collectData(array $param){
$item = new \Item();
$item->name = "TestElement";
$item->title = "Test";
$item->content = "Awesome content !";
$item->id = "Lalala";
$item->uri = "http://test.test/test";
$item->enclosures[] = "http://www.ardmediathek.de/ard/servlet/image/00/32/68/18/38/1135274624/16x9/960";
$this->items[] = $item;
}
public function getName() {
@@ -68,6 +78,6 @@ class DemoBridge extends BridgeAbstract{
}
public function getCacheDuration(){
return 3600; // 1 hour
return 00; // 1 hour
}
}

View File

@@ -0,0 +1,42 @@
<?php
class JapanExpoBridge extends BridgeAbstract{
public function loadMetadatas() {
$this->maintainer = "Ginko";
$this->name = "JapanExpo";
$this->uri = "http://www.japan-expo-paris.com/fr/actualites";
$this->description = "Returns most recent results from Japan Expo actualités.";
$this->update = "2016-01-19";
}
public function collectData(array $param){
$link = 'http://www.japan-expo-paris.com/fr/actualites';
$html = file_get_html($link) or $this->returnError('Could not request JapanExpo. for : ' . $link , 404);
foreach($html->find('a._tile2') as $element) {
$item = new Item();
$item->uri = $element->href;
$item->title = $element->find('span._title', 0)->plaintext;
$style = $element->find('img.rspvimgset', 0)->style;
preg_match('/url\(([^)]+)\)/', $style, $match);
$item->content = "<img src=".$match[1]."></img><br>".$element->find('span.date', 0)->plaintext;
$this->items[] = $item;
}
}
public function getName(){
return 'Japan Expo Actualités';
}
public function getURI(){
return 'http://www.japan-expo-paris.com/fr/actualites';
}
public function getCacheDuration(){
return 86400; // 1 day
}
}

View File

@@ -134,7 +134,7 @@ class LeBonCoinBridge extends BridgeAbstract{
public function collectData(array $param){
$html = '';
$link = 'http://www.leboncoin.fr/annonces/offres/' . $param[r] . '/?f=a&th=1&q=' . $param[k];
$link = 'http://www.leboncoin.fr/annonces/offres/' . $param['r'] . '/?f=a&th=1&q=' . $param['k'];
$html = file_get_html($link) or $this->returnError('Could not request LeBonCoin.', 404);
$list = $html->find('.list-lbc', 0);

View File

@@ -5,9 +5,9 @@ class ThePirateBayBridge extends BridgeAbstract{
$this->maintainer = "mitsukarenai";
$this->name = "The Pirate Bay";
$this->uri = "https://thepiratebay.vg/";
$this->uri = "https://thepiratebay.se/";
$this->description = "Returns results for the keywords. You can put several list of keywords by separating them with a semicolon (e.g. \"one show;another show\")";
$this->update = "2014-05-26";
$this->update = "2015-01-09";
$this->parameters[] =
'[
@@ -60,7 +60,7 @@ class ThePirateBayBridge extends BridgeAbstract{
$keywordsList = explode(";",$param['q']);
foreach($keywordsList as $keywords){
$html = file_get_html('https://thepiratebay.vg/search/'.rawurlencode($keywords).'/0/3/0') or $this->returnError('Could not request TPB.', 404);
$html = file_get_html('https://thepiratebay.se/search/'.rawurlencode($keywords).'/0/3/0') or $this->returnError('Could not request TPB.', 404);
if ($html->find('table#searchResult', 0) == FALSE)
$this->returnError('No result for query '.$keywords, 404);
@@ -68,7 +68,7 @@ class ThePirateBayBridge extends BridgeAbstract{
foreach($html->find('tr') as $element) {
$item = new \Item();
$item->uri = 'https://thepiratebay.vg/'.$element->find('a.detLink',0)->href;
$item->uri = 'https://thepiratebay.se/'.$element->find('a.detLink',0)->href;
$item->id = $item->uri;
$item->timestamp = parseDateTimestamp($element);
$item->title = $element->find('a.detLink',0)->plaintext;
@@ -86,7 +86,7 @@ class ThePirateBayBridge extends BridgeAbstract{
}
public function getURI(){
return 'https://thepiratebay.vg/';
return 'https://thepiratebay.se/';
}
public function getCacheDuration(){

View File

@@ -13,7 +13,7 @@ class TwitchApiBridge extends BridgeAbstract{
$this->name = "Twitch API Bridge";
$this->uri = "http://www.twitch.tv";
$this->description = "Returns the newest broadcasts or highlights by channel name using the Twitch API (v3)";
$this->update = "2015-07-14";
$this->update = "2016-01-09";
$this->parameters["Get channel without limit"] =
'[
@@ -31,7 +31,7 @@ class TwitchApiBridge extends BridgeAbstract{
"value" : "true"
},
{
"name" : "Don\'t show broadcasts",
"name" : "Show highlights",
"value" : "false"
}
]
@@ -58,7 +58,7 @@ class TwitchApiBridge extends BridgeAbstract{
"value" : "true"
},
{
"name" : "Don\'t show broadcasts",
"name" : "Show highlights",
"value" : "false"
}
]