[bridges] use constants instead of variable members

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière 2016-08-30 11:23:55 +02:00
parent 556b8a2452
commit 9a0da733ef
129 changed files with 834 additions and 834 deletions

View file

@ -1,10 +1,10 @@
<?php
class ABCTabsBridge extends BridgeAbstract{
public $maintainer = "kranack";
public $name = "ABC Tabs Bridge";
public $uri = "http://www.abc-tabs.com/";
public $description = "Returns 22 newest tabs";
const MAINTAINER = "kranack";
const NAME = "ABC Tabs Bridge";
const URI = "http://www.abc-tabs.com/";
const DESCRIPTION = "Returns 22 newest tabs";
public function collectData(){
$html = '';

View file

@ -2,10 +2,10 @@
class AcrimedBridge extends RssExpander{
public $maintainer = "qwertygc";
public $name = "Acrimed Bridge";
public $uri = "http://www.acrimed.org/";
public $description = "Returns the newest articles.";
const MAINTAINER = "qwertygc";
const NAME = "Acrimed Bridge";
const URI = "http://www.acrimed.org/";
const DESCRIPTION = "Returns the newest articles.";
public function collectData(){

View file

@ -2,11 +2,11 @@
class AllocineFRBridge extends BridgeAbstract{
public $maintainer = "superbaillot.net";
public $name = "Allo Cine Bridge";
public $uri = "http://www.allocine.fr";
public $description = "Bridge for allocine.fr";
public $parameters = array( array(
const MAINTAINER = "superbaillot.net";
const NAME = "Allo Cine Bridge";
const URI = "http://www.allocine.fr";
const DESCRIPTION = "Bridge for allocine.fr";
const PARAMETERS = array( array(
'category'=>array(
'name'=>'category',
'type'=>'list',
@ -38,10 +38,10 @@ class AllocineFRBridge extends BridgeAbstract{
}
public function getName(){
return $this->name.' : '
return self::NAME.' : '
.array_search(
$this->getInput('category'),
$this->parameters[$this->queriedContext]['category']['values']
self::PARAMETERS[$this->queriedContext]['category']['values']
);
}
@ -52,7 +52,7 @@ class AllocineFRBridge extends BridgeAbstract{
$category=array_search(
$this->getInput('category'),
$this->parameters[$this->queriedContext]['category']['values']
self::PARAMETERS[$this->queriedContext]['category']['values']
);

View file

@ -1,11 +1,11 @@
<?php
class AnimeUltimeBridge extends BridgeAbstract {
public $maintainer = 'ORelio';
public $name = 'Anime-Ultime';
public $uri = 'http://www.anime-ultime.net/';
public $description = 'Returns the 10 newest releases posted on Anime-Ultime';
public $parameters = array( array(
const MAINTAINER = 'ORelio';
const NAME = 'Anime-Ultime';
const URI = 'http://www.anime-ultime.net/';
const DESCRIPTION = 'Returns the 10 newest releases posted on Anime-Ultime';
const PARAMETERS = array( array(
'type'=>array(
'name'=>'Type',
'type'=>'list',
@ -25,7 +25,7 @@ class AnimeUltimeBridge extends BridgeAbstract {
//Add type filter if provided
$typeFilter = array_search(
$this->getInput('type'),
$this->parameters[$this->queriedContext]['type']['values']
self::PARAMETERS[$this->queriedContext]['type']['values']
);
//Build date and filters for making requests
@ -37,7 +37,7 @@ class AnimeUltimeBridge extends BridgeAbstract {
foreach (array($thismonth, $lastmonth) as $requestFilter) {
//Retrive page contents
$url = $this->uri.'history-0-1/'.$requestFilter;
$url = self::URI.'history-0-1/'.$requestFilter;
$html = $this->getSimpleHTMLDOM($url)
or $this->returnServerError('Could not request Anime-Ultime: '.$url);
@ -58,7 +58,7 @@ class AnimeUltimeBridge extends BridgeAbstract {
//Retrieve metadata from table columns
$item_link_element = $release->find('td', 0)->find('a', 0);
$item_uri = $this->uri.$item_link_element->href;
$item_uri = self::URI.$item_link_element->href;
$item_name = html_entity_decode($item_link_element->plaintext);
$item_episode = html_entity_decode(str_pad($release->find('td', 1)->plaintext, 2, '0', STR_PAD_LEFT));
$item_fansub = $release->find('td', 2)->plaintext;
@ -79,7 +79,7 @@ class AnimeUltimeBridge extends BridgeAbstract {
strpos($item_description, '<div id="table">')
);
$item_description = str_replace(
'src="images', 'src="'.$this->uri.'images',
'src="images', 'src="'.self::URI.'images',
$item_description
);
$item_description = str_replace("\r", '', $item_description);
@ -109,7 +109,7 @@ class AnimeUltimeBridge extends BridgeAbstract {
public function getName() {
$typeFilter = array_search(
$this->getInput('type'),
$this->parameters[$this->queriedContext]['type']['values']
self::PARAMETERS[$this->queriedContext]['type']['values']
);
return 'Latest '.$typeFilter.' - Anime-Ultime Bridge';

View file

@ -3,10 +3,10 @@
#error_reporting(E_ALL);
class ArstechnicaBridge extends BridgeAbstract {
public $maintainer = "prysme";
public $name = "ArstechnicaBridge";
public $uri = "http://arstechnica.com";
public $description = "The PC enthusiast's resource. Power users and the tools they love, without computing religion";
const MAINTAINER = "prysme";
const NAME = "ArstechnicaBridge";
const URI = "http://arstechnica.com";
const DESCRIPTION = "The PC enthusiast's resource. Power users and the tools they love, without computing religion";
function StripWithDelimiters($string, $start, $end) {
while (strpos($string, $start) !== false) {

View file

@ -1,11 +1,11 @@
<?php
class Arte7Bridge extends BridgeAbstract{
public $maintainer = "mitsukarenai";
public $name = "Arte +7";
public $uri = "http://www.arte.tv/";
public $description = "Returns newest videos from ARTE +7";
public $parameters = array(
const MAINTAINER = "mitsukarenai";
const NAME = "Arte +7";
const URI = "http://www.arte.tv/";
const DESCRIPTION = "Returns newest videos from ARTE +7";
const PARAMETERS = array(
'Catégorie (Français)' => array(
'catfr'=>array(
'type'=>'list',
@ -56,7 +56,7 @@
break;
}
$url = $this->uri.'guide/'.$lang.'/plus7/'.$category;
$url = self::URI.'guide/'.$lang.'/plus7/'.$category;
$input = $this->getContents($url) or die('Could not request ARTE.');
if(strpos($input, 'categoryVideoSet') !== FALSE){
$input = explode('categoryVideoSet: ', $input);

View file

@ -1,11 +1,11 @@
<?php
class AskfmBridge extends BridgeAbstract{
public $maintainer = "az5he6ch";
public $name = "Ask.fm Answers";
public $uri = "http://ask.fm/";
public $description = "Returns answers from an Ask.fm user";
public $parameters = array(
const MAINTAINER = "az5he6ch";
const NAME = "Ask.fm Answers";
const URI = "http://ask.fm/";
const DESCRIPTION = "Returns answers from an Ask.fm user";
const PARAMETERS = array(
'Ask.fm username'=>array(
'u'=>array(
'name'=>'Username',
@ -20,7 +20,7 @@ class AskfmBridge extends BridgeAbstract{
foreach($html->find('div.streamItem-answer') as $element) {
$item = array();
$item['uri'] = $this->uri.$element->find('a.streamItemsAge',0)->href;
$item['uri'] = self::URI.$element->find('a.streamItemsAge',0)->href;
$question = trim($element->find('h1.streamItemContent-question',0)->innertext);
$item['title'] = trim(htmlspecialchars_decode($element->find('h1.streamItemContent-question',0)->plaintext, ENT_QUOTES));
$answer = trim($element->find('p.streamItemContent-answer',0)->innertext);
@ -35,18 +35,18 @@ class AskfmBridge extends BridgeAbstract{
}
$content = '<p>' . $question . '</p><p>' . $answer . '</p><p>' . $visual . '</p>';
// Fix relative links without breaking // scheme used by YouTube stuff
$content = preg_replace('#href="\/(?!\/)#', 'href="'.$this->uri,$content);
$content = preg_replace('#href="\/(?!\/)#', 'href="'.self::URI,$content);
$item['content'] = $content;
$this->items[] = $item;
}
}
public function getName(){
return $this->name.' : '.$this->getInput('u');
return self::NAME.' : '.$this->getInput('u');
}
public function getURI(){
return $this->uri.urlencode($this->getInput('u')).'/answers/more?page=0';
return self::URI.urlencode($this->getInput('u')).'/answers/more?page=0';
}
public function getCacheDuration(){

View file

@ -1,11 +1,11 @@
<?php
class BandcampBridge extends BridgeAbstract{
public $maintainer = "sebsauvage";
public $name = "Bandcamp Tag";
public $uri = "http://bandcamp.com/";
public $description = "New bandcamp release by tag";
public $parameters = array( array(
const MAINTAINER = "sebsauvage";
const NAME = "Bandcamp Tag";
const URI = "http://bandcamp.com/";
const DESCRIPTION = "New bandcamp release by tag";
const PARAMETERS = array( array(
'tag'=>array(
'name'=>'tag',
'type'=>'text',
@ -33,7 +33,7 @@ class BandcampBridge extends BridgeAbstract{
}
public function getURI(){
return $this->uri.'tag/'.urlencode($this->getInput('tag')).'?sort_field=date';
return self::URI.'tag/'.urlencode($this->getInput('tag')).'?sort_field=date';
}
public function getName(){

View file

@ -1,17 +1,17 @@
<?php
class BastaBridge extends BridgeAbstract{
public $maintainer = "qwertygc";
public $name = "Bastamag Bridge";
public $uri = "http://www.bastamag.net/";
public $description = "Returns the newest articles.";
const MAINTAINER = "qwertygc";
const NAME = "Bastamag Bridge";
const URI = "http://www.bastamag.net/";
const DESCRIPTION = "Returns the newest articles.";
public function collectData(){
// Replaces all relative image URLs by absolute URLs. Relative URLs always start with 'local/'!
function ReplaceImageUrl($content){
return preg_replace('/src=["\']{1}([^"\']+)/ims', 'src=\''.$this->uri.'$1\'', $content);
return preg_replace('/src=["\']{1}([^"\']+)/ims', 'src=\''.self::URI.'$1\'', $content);
}
$html = $this->getSimpleHTMLDOM($this->uri.'spip.php?page=backend')
$html = $this->getSimpleHTMLDOM(self::URI.'spip.php?page=backend')
or $this->returnServerError('Could not request Bastamag.');
$limit = 0;

View file

@ -1,14 +1,14 @@
<?php
class BlaguesDeMerdeBridge extends BridgeAbstract{
public $maintainer = "superbaillot.net";
public $name = "Blagues De Merde";
public $uri = "http://www.blaguesdemerde.fr/";
public $description = "Blagues De Merde";
const MAINTAINER = "superbaillot.net";
const NAME = "Blagues De Merde";
const URI = "http://www.blaguesdemerde.fr/";
const DESCRIPTION = "Blagues De Merde";
public function collectData(){
$html = $this->getSimpleHTMLDOM($this->uri)
$html = $this->getSimpleHTMLDOM(self::URI)
or $this->returnServerError('Could not request BDM.');
foreach($html->find('article.joke_contener') as $element) {

View file

@ -1,12 +1,12 @@
<?php
class BooruprojectBridge extends BridgeAbstract{
public $maintainer = "mitsukarenai";
public $name = "Booruproject";
public $uri = "http://booru.org/";
public $description = "Returns images from given page and booruproject instance (****.booru.org)";
const MAINTAINER = "mitsukarenai";
const NAME = "Booruproject";
const URI = "http://booru.org/";
const DESCRIPTION = "Returns images from given page and booruproject instance (****.booru.org)";
public $parameters = array( array(
const PARAMETERS = array( array(
'i'=>array(
'name'=>'instance (required)',
'required'=>true

View file

@ -1,9 +1,9 @@
<?php
class CADBridge extends BridgeAbstract{
public $maintainer = "nyutag";
public $name = "CAD Bridge";
public $uri = "http://www.cad-comic.com/";
public $description = "Returns the newest articles.";
const MAINTAINER = "nyutag";
const NAME = "CAD Bridge";
const URI = "http://www.cad-comic.com/";
const DESCRIPTION = "Returns the newest articles.";
private function CADExtractContent($url) {
$html3 = $this->getSimpleHTMLDOM($url);

View file

@ -1,12 +1,12 @@
<?php
class CNETBridge extends BridgeAbstract {
public $maintainer = 'ORelio';
public $name = 'CNET News';
public $uri = 'http://www.cnet.com/';
public $description = 'Returns the newest articles. <br /> You may specify a topic found in some section URLs, else all topics are selected.';
const MAINTAINER = 'ORelio';
const NAME = 'CNET News';
const URI = 'http://www.cnet.com/';
const DESCRIPTION = 'Returns the newest articles. <br /> You may specify a topic found in some section URLs, else all topics are selected.';
public $parameters = array( array(
const PARAMETERS = array( array(
'topic'=>array('name'=>'Topic name')
));
@ -37,7 +37,7 @@ class CNETBridge extends BridgeAbstract {
return $article_html;
}
$pageUrl = $this->uri.(empty($this->getInput('topic')) ? '' : 'topics/'.$this->getInput('topic').'/');
$pageUrl = self::URI.(empty($this->getInput('topic')) ? '' : 'topics/'.$this->getInput('topic').'/');
$html = $this->getSimpleHTMLDOM($pageUrl) or $this->returnServerError('Could not request CNET: '.$pageUrl);
$limit = 0;
@ -45,7 +45,7 @@ class CNETBridge extends BridgeAbstract {
if ($limit < 8) {
$article_title = trim($element->find('h2', 0)->plaintext);
$article_uri = $this->uri.($element->find('a', 0)->href);
$article_uri = self::URI.($element->find('a', 0)->href);
$article_timestamp = strtotime($element->find('time.assetTime', 0)->plaintext);
$article_author = trim($element->find('a[rel=author]', 0)->plaintext);

View file

@ -1,11 +1,11 @@
<?php
class CastorusBridge extends BridgeAbstract {
public $maintainer = "logmanoriginal";
public $name = "Castorus Bridge";
public $uri = 'http://www.castorus.com';
public $description = "Returns the latest changes";
const MAINTAINER = "logmanoriginal";
const NAME = "Castorus Bridge";
const URI = 'http://www.castorus.com';
const DESCRIPTION = "Returns the latest changes";
public $parameters = array(
const PARAMETERS = array(
'Get latest changes' => array(),
'Get latest changes via ZIP code' => array(
'zip'=>array(
@ -44,7 +44,7 @@ class CastorusBridge extends BridgeAbstract {
if(!$url)
$this->returnServerError('Cannot find url!');
return $this->uri . $url->href;
return self::URI . $url->href;
}
// Extracts the time from an activity
@ -77,10 +77,10 @@ class CastorusBridge extends BridgeAbstract {
$zip_filter = trim($this->getInput('zip'));
$city_filter = trim($this->getInput('city'));
$html = $this->getSimpleHTMLDOM($this->uri);
$html = $this->getSimpleHTMLDOM(self::URI);
if(!$html)
$this->returnServerError('Could not load data from ' . $this->uri . '!');
$this->returnServerError('Could not load data from ' . self::URI . '!');
$activities = $html->find('div#activite/li');

View file

@ -1,10 +1,10 @@
<?php
class CollegeDeFranceBridge extends BridgeAbstract{
public $maintainer = "pit-fgfjiudghdf";
public $name = "CollegeDeFrance";
public $uri = "http://www.college-de-france.fr/";
public $description = "Returns the latest audio and video from CollegeDeFrance";
const MAINTAINER = "pit-fgfjiudghdf";
const NAME = "CollegeDeFrance";
const URI = "http://www.college-de-france.fr/";
const DESCRIPTION = "Returns the latest audio and video from CollegeDeFrance";
public function collectData(){
$months = array(
@ -30,7 +30,7 @@ class CollegeDeFranceBridge extends BridgeAbstract{
* </a>
* </li>
*/
$html = $this->getSimpleHTMLDOM($this->uri.'components/search-audiovideo.jsp?fulltext=&siteid=1156951719600&lang=FR&type=all')
$html = $this->getSimpleHTMLDOM(self::URI.'components/search-audiovideo.jsp?fulltext=&siteid=1156951719600&lang=FR&type=all')
or $this->returnServerError('Could not request CollegeDeFrance.');
foreach($html->find('a[data-target]') as $element) {
$item = array();
@ -62,7 +62,7 @@ class CollegeDeFranceBridge extends BridgeAbstract{
}
$item['timestamp'] = $d->format('U');
$item['content'] = $element->find('.lecturer', 0)->innertext . ' - ' . $element->find('.title', 0)->innertext;
$item['uri'] = $this->uri . $element->href;
$item['uri'] = self::URI . $element->href;
$this->items[] = $item;
}
}

View file

@ -1,10 +1,10 @@
<?php
class CommonDreamsBridge extends BridgeAbstract{
public $maintainer = "nyutag";
public $name = "CommonDreams Bridge";
public $uri = "http://www.commondreams.org/";
public $description = "Returns the newest articles.";
const MAINTAINER = "nyutag";
const NAME = "CommonDreams Bridge";
const URI = "http://www.commondreams.org/";
const DESCRIPTION = "Returns the newest articles.";
private function CommonDreamsExtractContent($url) {
$html3 = $this->getSimpleHTMLDOM($url);

View file

@ -1,13 +1,13 @@
<?php
class CopieDoubleBridge extends BridgeAbstract{
public $maintainer = "superbaillot.net";
public $name = "CopieDouble";
public $uri = "http://www.copie-double.com/";
public $description = "CopieDouble";
const MAINTAINER = "superbaillot.net";
const NAME = "CopieDouble";
const URI = "http://www.copie-double.com/";
const DESCRIPTION = "CopieDouble";
public function collectData(){
$html = $this->getSimpleHTMLDOM($this->uri)
$html = $this->getSimpleHTMLDOM(self::URI)
or $this->returnServerError('Could not request CopieDouble.');
$table = $html->find('table table', 2);
@ -26,10 +26,10 @@ class CopieDoubleBridge extends BridgeAbstract{
elseif(strpos($element->innertext, "/images/suivant.gif") === false)
{
$a=$element->find("a", 0);
$item['uri'] = $this->uri . $a->href;
$item['uri'] = self::URI . $a->href;
$content = str_replace('src="/', 'src="/'.$this->uri,$element->find("td", 0)->innertext);
$content = str_replace('href="/', 'href="'.$this->uri,$content);
$content = str_replace('src="/', 'src="/'.self::URI,$element->find("td", 0)->innertext);
$content = str_replace('href="/', 'href="'.self::URI,$content);
$item['content'] = $content;
$this->items[] = $item;
}

View file

@ -1,14 +1,14 @@
<?php
class CourrierInternationalBridge extends BridgeAbstract{
public $maintainer = "teromene";
public $name = "Courrier International Bridge";
public $uri = "http://CourrierInternational.com/";
public $description = "Courrier International bridge";
const MAINTAINER = "teromene";
const NAME = "Courrier International Bridge";
const URI = "http://CourrierInternational.com/";
const DESCRIPTION = "Courrier International bridge";
public function collectData(){
$html = $this->getSimpleHTMLDOM($this->uri)
$html = $this->getSimpleHTMLDOM(self::URI)
or $this->returnServerError('Error.');
$element = $html->find("article");
@ -22,7 +22,7 @@ class CourrierInternationalBridge extends BridgeAbstract{
$item['uri'] = $article->parent->getAttribute("href");
if(strpos($item['uri'], "http") === FALSE) {
$item['uri'] = $this->uri.$item['uri'];
$item['uri'] = self::URI.$item['uri'];
}
$page = $this->getSimpleHTMLDOM($item['uri']);

View file

@ -1,12 +1,12 @@
<?php
class CpasbienBridge extends HttpCachingBridgeAbstract{
public $maintainer = "lagaisse";
public $name = "Cpasbien Bridge";
public $uri = "http://www.cpasbien.io";
public $description = "Returns latest torrents from a request query";
const MAINTAINER = "lagaisse";
const NAME = "Cpasbien Bridge";
const URI = "http://www.cpasbien.io";
const DESCRIPTION = "Returns latest torrents from a request query";
public $parameters = array( array(
const PARAMETERS = array( array(
'q'=>array(
'name'=>'Search',
'required'=>true,
@ -16,7 +16,7 @@ class CpasbienBridge extends HttpCachingBridgeAbstract{
public function collectData(){
$request = str_replace(" ","-",trim($this->getInput('q')));
$html = $this->getSimpleHTMLDOM($this->uri.'/recherche/'.urlencode($request).'.html')
$html = $this->getSimpleHTMLDOM(self::URI.'/recherche/'.urlencode($request).'.html')
or $this->returnServerError('No results for this query.');
foreach ($html->find('#gauche',0)->find('div') as $episode) {
@ -40,7 +40,7 @@ class CpasbienBridge extends HttpCachingBridgeAbstract{
}
$item['id'] = $episode->find('a', 0)->getAttribute('href');
$item['uri'] = $this->uri . $htmlepisode->find('#telecharger',0)->getAttribute('href');
$item['uri'] = self::URI . $htmlepisode->find('#telecharger',0)->getAttribute('href');
$this->items[] = $item;
}
}
@ -48,7 +48,7 @@ class CpasbienBridge extends HttpCachingBridgeAbstract{
public function getName(){
return $this->getInput('q').' : '.$this->name;
return $this->getInput('q').' : '.self::NAME;
}
public function getCacheDuration(){

View file

@ -1,12 +1,12 @@
<?php
class CryptomeBridge extends BridgeAbstract{
public $maintainer = "BoboTiG";
public $name = "Cryptome";
public $uri = "https://cryptome.org/";
public $description = "Returns the N most recent documents.";
const MAINTAINER = "BoboTiG";
const NAME = "Cryptome";
const URI = "https://cryptome.org/";
const DESCRIPTION = "Returns the N most recent documents.";
public $parameters = array( array(
const PARAMETERS = array( array(
'n'=>array(
'name'=>'number of elements',
'type'=>'number',
@ -16,7 +16,7 @@ class CryptomeBridge extends BridgeAbstract{
));
public function collectData(){
$html = $this->getSimpleHTMLDOM($this->uri)
$html = $this->getSimpleHTMLDOM(self::URI)
or $this->returnServerError('Could not request Cryptome.');
if (!empty($this->getInput('n'))) { /* number of documents */
$num = min($this->getInput('n'), 20);
@ -26,9 +26,9 @@ class CryptomeBridge extends BridgeAbstract{
foreach($html->find('pre') as $element) {
for ( $i = 0; $i < $num; ++$i ) {
$item = array();
$item['uri'] = $this->uri.substr($element->find('a', $i)->href, 20);
$item['uri'] = self::URI.substr($element->find('a', $i)->href, 20);
$item['title'] = substr($element->find('b', $i)->plaintext, 22);
$item['content'] = preg_replace('#http://cryptome.org/#', $this->uri, $element->find('b', $i)->innertext);
$item['content'] = preg_replace('#http://cryptome.org/#', self::URI, $element->find('b', $i)->innertext);
$this->items[] = $item;
}
break;

View file

@ -1,12 +1,12 @@
<?php
class DailymotionBridge extends BridgeAbstract{
public $maintainer = "mitsukarenai";
public $name = "Dailymotion Bridge";
public $uri = "https://www.dailymotion.com/";
public $description = "Returns the 5 newest videos by username/playlist or search";
const MAINTAINER = "mitsukarenai";
const NAME = "Dailymotion Bridge";
const URI = "https://www.dailymotion.com/";
const DESCRIPTION = "Returns the 5 newest videos by username/playlist or search";
public $parameters = array (
const PARAMETERS = array (
'By username' => array(
'u'=>array(
'name'=>'username',
@ -35,7 +35,7 @@ class DailymotionBridge extends BridgeAbstract{
function getMetadata($id) {
$metadata=array();
$html2 = $this->getSimpleHTMLDOM($this->uri.'video/'.$id);
$html2 = $this->getSimpleHTMLDOM(self::URI.'video/'.$id);
if(!$html2){
return $metadata;
}
@ -90,7 +90,7 @@ class DailymotionBridge extends BridgeAbstract{
}
public function getURI(){
$uri=$this->uri;
$uri=self::URI;
switch($this->queriedContext){
case 'By username':
$uri.='user/'

View file

@ -1,12 +1,12 @@
<?php
class DanbooruBridge extends BridgeAbstract{
public $maintainer = "mitsukarenai";
public $name = "Danbooru";
public $uri = "http://donmai.us/";
public $description = "Returns images from given page";
const MAINTAINER = "mitsukarenai";
const NAME = "Danbooru";
const URI = "http://donmai.us/";
const DESCRIPTION = "Returns images from given page";
public $parameters = array( array(
const PARAMETERS = array( array(
'p'=>array(
'name'=>'page',
'type'=>'number'
@ -18,14 +18,14 @@ class DanbooruBridge extends BridgeAbstract{
$page = $this->getInput('p')?$this->getInput('p'):1;
$tags = urlencode($this->getInput('t'));
$html = $this->getSimpleHTMLDOM($this->uri."posts?&page=$page&tags=$tags")
$html = $this->getSimpleHTMLDOM(self::URI."posts?&page=$page&tags=$tags")
or $this->returnServerError('Could not request Danbooru.');
foreach($html->find('div[id=posts] article') as $element) {
$item = array();
$item['uri'] = $this->uri.$element->find('a', 0)->href;
$item['uri'] = self::URI.$element->find('a', 0)->href;
$item['postid'] = (int)preg_replace("/[^0-9]/",'', $element->getAttribute('data-id'));
$item['timestamp'] = time();
$thumbnailUri = $this->uri.$element->find('img', 0)->src;
$thumbnailUri = self::URI.$element->find('img', 0)->src;
$item['tags'] = $element->find('img', 0)->getAttribute('alt');
$item['title'] = 'Danbooru | '.$item['postid'];
$item['content'] = '<a href="' . $item['uri'] . '"><img src="' . $thumbnailUri . '" /></a><br>Tags: '.$item['tags'];

View file

@ -1,14 +1,14 @@
<?php
class DansTonChatBridge extends BridgeAbstract{
public $maintainer = "Astalaseven";
public $name = "DansTonChat Bridge";
public $uri = "http://danstonchat.com/";
public $description = "Returns latest quotes from DansTonChat.";
const MAINTAINER = "Astalaseven";
const NAME = "DansTonChat Bridge";
const URI = "http://danstonchat.com/";
const DESCRIPTION = "Returns latest quotes from DansTonChat.";
public function collectData(){
$html = $this->getSimpleHTMLDOM($this->uri.'latest.html')
$html = $this->getSimpleHTMLDOM(self::URI.'latest.html')
or $this->returnServerError('Could not request DansTonChat.');
foreach($html->find('div.item') as $element) {

View file

@ -1,12 +1,12 @@
<?php
class DauphineLibereBridge extends BridgeAbstract {
public $maintainer = "qwertygc";
public $name = "Dauphine Bridge";
public $uri = "http://www.ledauphine.com/";
public $description = "Returns the newest articles.";
const MAINTAINER = "qwertygc";
const NAME = "Dauphine Bridge";
const URI = "http://www.ledauphine.com/";
const DESCRIPTION = "Returns the newest articles.";
public $parameters = array( array(
const PARAMETERS = array( array(
'u'=>array(
'name'=>'Catégorie de l\'article',
'type'=>'list',
@ -42,10 +42,10 @@ class DauphineLibereBridge extends BridgeAbstract {
$context = stream_context_create($opts);
if (empty($this->getInput('u'))) {
$html = $this->getSimpleHTMLDOM($this->uri.$this->getInput('u').'/rss')
$html = $this->getSimpleHTMLDOM(self::URI.$this->getInput('u').'/rss')
or $this->returnServerError('Could not request DauphineLibere.');
} else {
$html = $this->getSimpleHTMLDOM($this->uri.'rss')
$html = $this->getSimpleHTMLDOM(self::URI.'rss')
or $this->returnServerError('Could not request DauphineLibere.');
}
$limit = 0;

View file

@ -1,12 +1,12 @@
<?php
class DemoBridge extends BridgeAbstract{
public $maintainer = "teromene";
public $name = "DemoBridge";
public $uri = "http://github.com/rss-bridge/rss-bridge";
public $description = "Bridge used for demos";
const MAINTAINER = "teromene";
const NAME = "DemoBridge";
const URI = "http://github.com/rss-bridge/rss-bridge";
const DESCRIPTION = "Bridge used for demos";
public $parameters = array(
const PARAMETERS = array(
'testCheckbox' => array(
'testCheckbox'=>array(
'type'=>'checkbox',

View file

@ -1,10 +1,10 @@
<?php
class DeveloppezDotComBridge extends BridgeAbstract{
public $maintainer = "polopollo";
public $name = "Developpez.com Actus (FR)";
public $uri = "http://www.developpez.com/";
public $description = "Returns the 15 newest posts from DeveloppezDotCom (full text).";
const MAINTAINER = "polopollo";
const NAME = "Developpez.com Actus (FR)";
const URI = "http://www.developpez.com/";
const DESCRIPTION = "Returns the 15 newest posts from DeveloppezDotCom (full text).";
private function DeveloppezDotComStripCDATA($string) {
$string = str_replace('<![CDATA[', '', $string);
@ -39,8 +39,8 @@ class DeveloppezDotComBridge extends BridgeAbstract{
}
public function collectData(){
$rssFeed = $this->getSimpleHTMLDOM($this->uri.'index/rss')
or $this->returnServerError('Could not request '.$this->uri.'index/rss');
$rssFeed = $this->getSimpleHTMLDOM(self::URI.'index/rss')
or $this->returnServerError('Could not request '.self::URI.'index/rss');
$limit = 0;
foreach($rssFeed->find('item') as $element) {

View file

@ -1,10 +1,10 @@
<?php
class DilbertBridge extends BridgeAbstract {
public $maintainer = 'kranack';
public $name = 'Dilbert Daily Strip';
public $uri = 'http://dilbert.com';
public $description = 'The Unofficial Dilbert Daily Comic Strip';
const MAINTAINER = 'kranack';
const NAME = 'Dilbert Daily Strip';
const URI = 'http://dilbert.com';
const DESCRIPTION = 'The Unofficial Dilbert Daily Comic Strip';
public function collectData(){

View file

@ -1,13 +1,13 @@
<?php
class DollbooruBridge extends BridgeAbstract{
public $maintainer = "mitsukarenai";
public $name = "Dollbooru";
public $uri = "http://dollbooru.org/";
public $description = "Returns images from given page";
const MAINTAINER = "mitsukarenai";
const NAME = "Dollbooru";
const URI = "http://dollbooru.org/";
const DESCRIPTION = "Returns images from given page";
public $parameters = array( array(
const PARAMETERS = array( array(
'p'=>array(
'name'=>'page',
'type'=>'number'
@ -18,16 +18,16 @@ class DollbooruBridge extends BridgeAbstract{
public function collectData(){
$page=$this->getInput('p');
$tags = urlencode($this->getInput('t'));
$html = $this->getSimpleHTMLDOM($this->uri."post/list/$tags/$page")
$html = $this->getSimpleHTMLDOM(self::URI."post/list/$tags/$page")
or $this->returnServerError('Could not request Dollbooru.');
foreach($html->find('div[class=shm-image-list] a') as $element) {
$item = array();
$item['uri'] = $this->uri.$element->href;
$item['uri'] = self::URI.$element->href;
$item['postid'] = (int)preg_replace("/[^0-9]/",'', $element->getAttribute('data-post-id'));
$item['timestamp'] = time();
$thumbnailUri = $this->uri.$element->find('img', 0)->src;
$thumbnailUri = self::URI.$element->find('img', 0)->src;
$item['tags'] = $element->getAttribute('data-tags');
$item['title'] = 'Dollbooru | '.$item['postid'];
$item['content'] = '<a href="' . $item['uri'] . '"><img src="' . $thumbnailUri . '" /></a><br>Tags: '.$item['tags'];

View file

@ -1,19 +1,19 @@
<?php
class DuckDuckGoBridge extends BridgeAbstract{
public $maintainer = "Astalaseven";
public $name = "DuckDuckGo";
public $uri = "https://duckduckgo.com/";
public $description = "Returns most recent results from DuckDuckGo.";
const MAINTAINER = "Astalaseven";
const NAME = "DuckDuckGo";
const URI = "https://duckduckgo.com/";
const DESCRIPTION = "Returns most recent results from DuckDuckGo.";
public $parameters = array( array(
const PARAMETERS = array( array(
'u'=>array(
'name'=>'keyword',
'required'=>true)
));
public function collectData(){
$html = $this->getSimpleHTMLDOM($this->uri.'html/?q='.$this->getInput('u').'+sort:date')
$html = $this->getSimpleHTMLDOM(self::URI.'html/?q='.$this->getInput('u').'+sort:date')
or $this->returnServerError('Could not request DuckDuckGo.');
foreach($html->find('div.results_links') as $element) {

View file

@ -1,12 +1,12 @@
<?php
class EZTVBridge extends BridgeAbstract{
public $maintainer = "alexAubin";
public $name = "EZTV";
public $uri = "https://eztv.ch/";
public $description = "Returns list of *recent* torrents for a specific show on EZTV. Get showID from URLs in https://eztv.ch/shows/showID/show-full-name.";
const MAINTAINER = "alexAubin";
const NAME = "EZTV";
const URI = "https://eztv.ch/";
const DESCRIPTION = "Returns list of *recent* torrents for a specific show on EZTV. Get showID from URLs in https://eztv.ch/shows/showID/show-full-name.";
public $parameters = array( array(
const PARAMETERS = array( array(
'i'=>array(
'name'=>'Show ids',
'exampleValue'=>'showID1,showID2,…',
@ -34,7 +34,7 @@ class EZTVBridge extends BridgeAbstract{
foreach($showList as $showID){
// Get show page
$html = $this->getSimpleHTMLDOM($this->uri.'shows/'.rawurlencode($showID).'/')
$html = $this->getSimpleHTMLDOM(self::URI.'shows/'.rawurlencode($showID).'/')
or $this->returnServerError('Could not request EZTV for id "'.$showID.'"');
// Loop on each element that look like an episode entry...
@ -53,7 +53,7 @@ class EZTVBridge extends BridgeAbstract{
// Fill item
$item = array();
$item['uri'] = $this->uri.$epinfo->href;
$item['uri'] = self::URI.$epinfo->href;
$item['id'] = $item['uri'];
$item['timestamp'] = makeTimestamp($released->plaintext);
$item['title'] = $epinfo->plaintext;

View file

@ -1,20 +1,20 @@
<?php
class EliteDangerousGalnetBridge extends BridgeAbstract
{
public $maintainer = "corenting";
public $name = "Elite: Dangerous Galnet";
public $uri = "https://community.elitedangerous.com/galnet/";
public $description = "Returns the latest page of news from Galnet";
const MAINTAINER = "corenting";
const NAME = "Elite: Dangerous Galnet";
const URI = "https://community.elitedangerous.com/galnet/";
const DESCRIPTION = "Returns the latest page of news from Galnet";
public function collectData()
{
$html = $this->getSimpleHTMLDOM($this->uri)
$html = $this->getSimpleHTMLDOM(self::URI)
or $this->returnServerError('Error while downloading the website content');
foreach($html->find('div.article') as $element) {
$item = array();
$uri = $element->find('h3 a', 0)->href;
$uri = $this->uri . substr($uri,strlen('/galnet/'));
$uri = self::URI . substr($uri,strlen('/galnet/'));
$item['uri'] = $uri;
$title = $element->find('h3 a', 0)->plaintext;

View file

@ -1,11 +1,11 @@
<?php
class ElsevierBridge extends BridgeAbstract{
public $maintainer = 'Pierre Mazière';
public $name = 'Elsevier journals recent articles';
public $uri = 'http://www.journals.elsevier.com/';
public $description = 'Returns the recent articles published in Elsevier journals';
const MAINTAINER = 'Pierre Mazière';
const NAME = 'Elsevier journals recent articles';
const URI = 'http://www.journals.elsevier.com/';
const DESCRIPTION = 'Returns the recent articles published in Elsevier journals';
public $parameters = array( array(
const PARAMETERS = array( array(
'j'=>array(
'name'=>'Journal name',
'required'=>true,
@ -56,7 +56,7 @@ class ElsevierBridge extends BridgeAbstract{
}
public function collectData(){
$uri = $this->uri . $this->getInput('j') . '/recent-articles/';
$uri = self::URI . $this->getInput('j') . '/recent-articles/';
$html = $this->getSimpleHTMLDOM($uri) or $this->returnServerError('No results for Elsevier journal '.$this->getInput('j'));
foreach($html->find('.pod-listing') as $article){

View file

@ -1,10 +1,10 @@
<?php
class EstCeQuonMetEnProdBridge extends BridgeAbstract {
public $maintainer = 'ORelio';
public $name = 'Est-ce qu\'on met en prod aujourd\'hui ?';
public $uri = 'https://www.estcequonmetenprodaujourdhui.info/';
public $description = 'Should we put a website in production today? (French)';
const MAINTAINER = 'ORelio';
const NAME = 'Est-ce qu\'on met en prod aujourd\'hui ?';
const URI = 'https://www.estcequonmetenprodaujourdhui.info/';
const DESCRIPTION = 'Should we put a website in production today? (French)';
public function collectData(){
function ExtractFromDelimiters($string, $start, $end) {

View file

@ -1,12 +1,12 @@
<?php
class FacebookBridge extends BridgeAbstract{
public $maintainer = "teromene";
public $name = "Facebook";
public $uri = "https://www.facebook.com/";
public $description = "Input a page title or a profile log. For a profile log, please insert the parameter as follow : myExamplePage/132621766841117";
const MAINTAINER = "teromene";
const NAME = "Facebook";
const URI = "https://www.facebook.com/";
const DESCRIPTION = "Input a page title or a profile log. For a profile log, please insert the parameter as follow : myExamplePage/132621766841117";
public $parameters =array( array(
const PARAMETERS =array( array(
'u'=>array(
'name'=>'Username',
'required'=>true
@ -31,7 +31,7 @@ class FacebookBridge extends BridgeAbstract{
if (is_array($matches) && count($matches) > 1) {
$link = $matches[1];
if (strpos($link, '/') === 0)
$link = $this->uri.$link.'"';
$link = self::URI.$link.'"';
if (strpos($link, 'facebook.com/l.php?u=') !== false)
$link = urldecode(ExtractFromDelimiters($link, 'facebook.com/l.php?u=', '&'));
return ' href="'.$link.'"';
@ -104,10 +104,10 @@ class FacebookBridge extends BridgeAbstract{
//Retrieve page contents
if (is_null($html)) {
if (!strpos($this->getInput('u'), "/")) {
$html = $this->getSimpleHTMLDOM($this->uri.urlencode($this->getInput('u')).'?_fb_noscript=1')
$html = $this->getSimpleHTMLDOM(self::URI.urlencode($this->getInput('u')).'?_fb_noscript=1')
or $this->returnServerError('No results for this query.');
} else {
$html = $this->getSimpleHTMLDOM($this->uri.'pages/'.$this->getInput('u').'?_fb_noscript=1')
$html = $this->getSimpleHTMLDOM(self::URI.'pages/'.$this->getInput('u').'?_fb_noscript=1')
or $this->returnServerError('No results for this query.');
}
}
@ -123,7 +123,7 @@ class FacebookBridge extends BridgeAbstract{
foreach ($captcha->find('input, button') as $input)
$captcha_fields[$input->name] = $input->value;
$_SESSION['captcha_fields'] = $captcha_fields;
$_SESSION['captcha_action'] = $this->uri.$captcha->find('form', 0)->action;
$_SESSION['captcha_action'] = self::URI.$captcha->find('form', 0)->action;
//Show captcha filling form to the viewer, proxying the captcha image
$img = base64_encode($this->getContents($captcha->find('img', 0)->src));
@ -192,7 +192,7 @@ class FacebookBridge extends BridgeAbstract{
$title = substr($title, 0, strpos(wordwrap($title, 64), "\n")).'...';
//Build and add final item
$item['uri'] = $this->uri.$post->find('abbr')[0]->parent()->getAttribute('href');
$item['uri'] = self::URI.$post->find('abbr')[0]->parent()->getAttribute('href');
$item['content'] = $content;
$item['title'] = $title;
$item['author'] = $author;

View file

@ -1,13 +1,13 @@
<?php
class FierPandaBridge extends BridgeAbstract {
public $maintainer = "snroki";
public $name = "Fier Panda Bridge";
public $uri = "http://www.fier-panda.fr/";
public $description = "Returns latest articles from Fier Panda.";
const MAINTAINER = "snroki";
const NAME = "Fier Panda Bridge";
const URI = "http://www.fier-panda.fr/";
const DESCRIPTION = "Returns latest articles from Fier Panda.";
public function collectData(){
$html = $this->getSimpleHTMLDOM($this->uri) or $this->returnServerError('Could not request Fier Panda.');
$html = $this->getSimpleHTMLDOM(self::URI) or $this->returnServerError('Could not request Fier Panda.');
foreach($html->find('div.container-content article') as $element) {
$item = array();

View file

@ -1,13 +1,13 @@
<?php
class FlickrExploreBridge extends BridgeAbstract{
public $maintainer = "sebsauvage";
public $name = "Flickr Explore";
public $uri = "https://www.flickr.com/";
public $description = "Returns the latest interesting images from Flickr";
const MAINTAINER = "sebsauvage";
const NAME = "Flickr Explore";
const URI = "https://www.flickr.com/";
const DESCRIPTION = "Returns the latest interesting images from Flickr";
public function collectData(){
$html = $this->getSimpleHTMLDOM($this->uri.'explore')
$html = $this->getSimpleHTMLDOM(self::URI.'explore')
or $this->returnServerError('Could not request Flickr.');
foreach($html->find('.photo-list-photo-view') as $element) {
@ -32,7 +32,7 @@ class FlickrExploreBridge extends BridgeAbstract{
)) or $this->returnServerError('Could not request Flickr.'); // FIXME: Request time too long...
$item = array();
$item['uri'] = $this->uri.'photo.gne?id='.$imageID;
$item['uri'] = self::URI.'photo.gne?id='.$imageID;
$item['content'] = '<a href="' . $item['uri'] . '"><img src="' . $imageURI . '" /></a>'; // FIXME: Filter javascript ?
$item['title'] = $imageJSON->photo->title->_content;
$this->items[] = $item;

View file

@ -1,12 +1,12 @@
<?php
class FlickrTagBridge extends BridgeAbstract{
public $maintainer = "erwang";
public $name = "Flickr TagUser";
public $uri = "http://www.flickr.com/";
public $description = "Returns the tagged or user images from Flickr";
const MAINTAINER = "erwang";
const NAME = "Flickr TagUser";
const URI = "http://www.flickr.com/";
const DESCRIPTION = "Returns the tagged or user images from Flickr";
public $parameters = array(
const PARAMETERS = array(
'By keyword' => array(
'q'=>array(
'name'=>'keyword',
@ -25,18 +25,18 @@ class FlickrTagBridge extends BridgeAbstract{
public function collectData(){
switch($this->queriedContext){
case 'By keyword':
$html = $this->getSimpleHTMLDOM($this->uri.'search/?q='.urlencode($this->getInput('q')).'&s=rec')
$html = $this->getSimpleHTMLDOM(self::URI.'search/?q='.urlencode($this->getInput('q')).'&s=rec')
or $this->returnServerError('No results for this query.');
break;
case 'by username':
$html = $this->getSimpleHTMLDOM($this->uri.'photos/'.urlencode($this->getInput('u')).'/')
$html = $this->getSimpleHTMLDOM(self::URI.'photos/'.urlencode($this->getInput('u')).'/')
or $this->returnServerError('Requested username can\'t be found.');
break;
}
foreach($html->find('span.photo_container') as $element) {
$item = array();
$item['uri'] = $this->uri.$element->find('a',0)->href;
$item['uri'] = self::URI.$element->find('a',0)->href;
$thumbnailUri = $element->find('img',0)->getAttribute('data-defer-src');
$item['content'] = '<a href="' . $item['uri'] . '"><img src="' . $thumbnailUri . '" /></a>'; // FIXME: Filter javascript ?
$item['title'] = $element->find('a',0)->title;

View file

@ -1,13 +1,13 @@
<?php
class FootitoBridge extends BridgeAbstract{
public $maintainer = "superbaillot.net";
public $name = "Footito";
public $uri = "http://www.footito.fr/";
public $description = "Footito";
const MAINTAINER = "superbaillot.net";
const NAME = "Footito";
const URI = "http://www.footito.fr/";
const DESCRIPTION = "Footito";
public function collectData(){
$html = $this->getSimpleHTMLDOM($this->uri)
$html = $this->getSimpleHTMLDOM(self::URI)
or $this->returnServerError('Could not request Footito.');
foreach($html->find('div.post') as $element) {

View file

@ -1,12 +1,12 @@
<?php
class FourchanBridge extends BridgeAbstract{
public $maintainer = "mitsukarenai";
public $name = "4chan";
public $uri = "https://www.4chan.org/";
public $description = "Returns posts from the specified thread";
const MAINTAINER = "mitsukarenai";
const NAME = "4chan";
const URI = "https://www.4chan.org/";
const DESCRIPTION = "Returns posts from the specified thread";
public $parameters = array( array(
const PARAMETERS = array( array(
't'=>array(
'name'=>'Thread URL',
'pattern'=>'(https:\/\/)?boards\.4chan\.org\/.*thread\/.*',

View file

@ -2,10 +2,10 @@
define("FREENEWS_RSS", 'http://feeds.feedburner.com/Freenews-Freebox?format=xml');
class FreenewsBridge extends RssExpander {
public $maintainer = "mitsukarenai";
public $name = "Freenews";
public $uri = "http://freenews.fr";
public $description = "Un site d'actualité pour les freenautes (mais ne parlant pas que de la freebox). Ne rentrez pas d'id si vous voulez accéder aux actualités générales.";
const MAINTAINER = "mitsukarenai";
const NAME = "Freenews";
const URI = "http://freenews.fr";
const DESCRIPTION = "Un site d'actualité pour les freenautes (mais ne parlant pas que de la freebox). Ne rentrez pas d'id si vous voulez accéder aux actualités générales.";
public function collectData(){
parent::collectExpandableDatas(FREENEWS_RSS);

View file

@ -1,12 +1,12 @@
<?php
class FuturaSciencesBridge extends BridgeAbstract {
public $maintainer = 'ORelio';
public $name = 'Futura-Sciences Bridge';
public $uri = 'http://www.futura-sciences.com/';
public $description = 'Returns the newest articles.';
const MAINTAINER = 'ORelio';
const NAME = 'Futura-Sciences Bridge';
const URI = 'http://www.futura-sciences.com/';
const DESCRIPTION = 'Returns the newest articles.';
public $parameters = array( array(
const PARAMETERS = array( array(
'feed'=> array(
'name'=>'Feed',
'type'=>'list',

View file

@ -1,12 +1,12 @@
<?php
class GBAtempBridge extends BridgeAbstract {
public $maintainer = 'ORelio';
public $name = 'GBAtemp';
public $uri = 'http://gbatemp.net/';
public $description = 'GBAtemp is a user friendly underground video game community.';
const MAINTAINER = 'ORelio';
const NAME = 'GBAtemp';
const URI = 'http://gbatemp.net/';
const DESCRIPTION = 'GBAtemp is a user friendly underground video game community.';
public $parameters = array( array(
const PARAMETERS = array( array(
'type'=>array(
'name'=>'Type',
'type'=>'list',
@ -65,22 +65,22 @@ class GBAtempBridge extends BridgeAbstract {
public function collectData(){
$html = $this->getSimpleHTMLDOM($this->uri)
$html = $this->getSimpleHTMLDOM(self::URI)
or $this->returnServerError('Could not request GBAtemp.');
switch($this->getInput('type')){
case 'N':
foreach ($html->find('li[class=news_item full]') as $newsItem) {
$url = $this->uri.$newsItem->find('a', 0)->href;
$url = self::URI.$newsItem->find('a', 0)->href;
$time = intval($this->ExtractFromDelimiters($newsItem->find('abbr.DateTime', 0)->outertext, 'data-time="', '"'));
$author = $newsItem->find('a.username', 0)->plaintext;
$title = $newsItem->find('a', 1)->plaintext;
$content = $this->fetch_post_content($url, $this->uri);
$content = $this->fetch_post_content($url, self::URI);
$this->items[] = $this->build_item($url, $title, $author, $time, $content);
}
case 'R':
foreach ($html->find('li.portal_review') as $reviewItem) {
$url = $this->uri.$reviewItem->find('a', 0)->href;
$url = self::URI.$reviewItem->find('a', 0)->href;
$title = $reviewItem->find('span.review_title', 0)->plaintext;
$content = $this->getSimpleHTMLDOM($url) or $this->returnServerError('Could not request GBAtemp: '.$uri);
$author = $content->find('a.username', 0)->plaintext;
@ -90,25 +90,25 @@ class GBAtempBridge extends BridgeAbstract {
$subheader = '<p><b>'.$content->find('div.review_subheader', 0)->plaintext.'</b></p>';
$procons = $content->find('table.review_procons', 0)->outertext;
$scores = $content->find('table.reviewscores', 0)->outertext;
$content = $this->cleanup_post_content($intro.$review.$subheader.$procons.$scores, $this->uri);
$content = $this->cleanup_post_content($intro.$review.$subheader.$procons.$scores, self::URI);
$this->items[] = $this->build_item($url, $title, $author, $time, $content);
}
case 'T':
foreach ($html->find('li.portal-tutorial') as $tutorialItem) {
$url = $this->uri.$tutorialItem->find('a', 0)->href;
$url = self::URI.$tutorialItem->find('a', 0)->href;
$title = $tutorialItem->find('a', 0)->plaintext;
$time = intval($this->ExtractFromDelimiters($tutorialItem->find('abbr.DateTime', 0)->outertext, 'data-time="', '"'));
$author = $tutorialItem->find('a.username', 0)->plaintext;
$content = $this->fetch_post_content($url, $this->uri);
$content = $this->fetch_post_content($url, self::URI);
$this->items[] = $this->build_item($url, $title, $author, $time, $content);
}
case 'F':
foreach ($html->find('li.rc_item') as $postItem) {
$url = $this->uri.$postItem->find('a', 1)->href;
$url = self::URI.$postItem->find('a', 1)->href;
$title = $postItem->find('a', 1)->plaintext;
$time = intval($this->ExtractFromDelimiters($postItem->find('abbr.DateTime', 0)->outertext, 'data-time="', '"'));
$author = $postItem->find('a.username', 0)->plaintext;
$content = $this->fetch_post_content($url, $this->uri);
$content = $this->fetch_post_content($url, self::URI);
$this->items[] = $this->build_item($url, $title, $author, $time, $content);
}
}
@ -117,7 +117,7 @@ class GBAtempBridge extends BridgeAbstract {
public function getName() {
$type=array_search(
$this->getInput('type'),
$this->parameters[$this->queriedContext]['type']['values']
self::PARAMETERS[$this->queriedContext]['type']['values']
);
return 'GBAtemp '.$type.' Bridge';
}

View file

@ -1,12 +1,12 @@
<?php
class GelbooruBridge extends BridgeAbstract{
public $maintainer = "mitsukarenai";
public $name = "Gelbooru";
public $uri = "http://gelbooru.com/";
public $description = "Returns images from given page";
const MAINTAINER = "mitsukarenai";
const NAME = "Gelbooru";
const URI = "http://gelbooru.com/";
const DESCRIPTION = "Returns images from given page";
public $parameters = array( array(
const PARAMETERS = array( array(
'p'=>array(
'name'=>'page',
'type'=>'number'
@ -16,14 +16,14 @@ class GelbooruBridge extends BridgeAbstract{
public function collectData(){
$html = $this->getSimpleHTMLDOM(
$this->uri.'index.php?page=post&s=list&'
self::URI.'index.php?page=post&s=list&'
.'&pid='.($this->getInput('p')?($this->getInput('p') -1)*63:'')
.'&tags='.urlencode($this->getInput('t'))
) or $this->returnServerError('Could not request Gelbooru.');
foreach($html->find('div[class=content] span') as $element) {
$item = array();
$item['uri'] = $this->uri.$element->find('a', 0)->href;
$item['uri'] = self::URI.$element->find('a', 0)->href;
$item['postid'] = (int)preg_replace("/[^0-9]/",'', $element->getAttribute('id'));
$item['timestamp'] = time();
$thumbnailUri = $element->find('img', 0)->src;

View file

@ -3,12 +3,12 @@ define('GIPHY_LIMIT', 10);
class GiphyBridge extends BridgeAbstract{
public $maintainer = "kraoc";
public $name = "Giphy Bridge";
public $uri = "http://giphy.com/";
public $description = "Bridge for giphy.com";
const MAINTAINER = "kraoc";
const NAME = "Giphy Bridge";
const URI = "http://giphy.com/";
const DESCRIPTION = "Bridge for giphy.com";
public $parameters = array( array(
const PARAMETERS = array( array(
's'=>array(
'name'=>'search tag',
'required'=>true
@ -22,7 +22,7 @@ class GiphyBridge extends BridgeAbstract{
public function collectData(){
$html = '';
$base_url = 'http://giphy.com';
$html = $this->getSimpleHTMLDOM($this->uri.'/search/'.urlencode($this->getInput('s').'/'))
$html = $this->getSimpleHTMLDOM(self::URI.'/search/'.urlencode($this->getInput('s').'/'))
or $this->returnServerError('No results for this query.');
$max = GIPHY_LIMIT;
@ -37,7 +37,7 @@ class GiphyBridge extends BridgeAbstract{
$node = $entry->first_child();
$href = $node->getAttribute('href');
$html2 = $this->getSimpleHTMLDOM($this->uri . $href)
$html2 = $this->getSimpleHTMLDOM(self::URI . $href)
or $this->returnServerError('No results for this query.');
$figure = $html2->getElementByTagName('figure');
$img = $figure->firstChild();

View file

@ -1,12 +1,12 @@
<?php
class GithubIssueBridge extends BridgeAbstract{
public $maintainer = 'Pierre Mazière';
public $name = 'Github Issue';
public $uri = 'https://github.com/';
public $description = 'Returns the issues or comments of an issue of a github project';
const MAINTAINER = 'Pierre Mazière';
const NAME = 'Github Issue';
const URI = 'https://github.com/';
const DESCRIPTION = 'Returns the issues or comments of an issue of a github project';
public $parameters=array(
const PARAMETERS=array(
'global'=>array (
'u'=>array(
'name'=>'User name',
@ -29,7 +29,7 @@ class GithubIssueBridge extends BridgeAbstract{
);
public function collectData(){
$uri = $this->uri.$this->getInput('u').'/'.$this->getInput('p')
$uri = self::URI.$this->getInput('u').'/'.$this->getInput('p')
.'/issues/'.$this->getInput('i');
$html = $this->getSimpleHTMLDOM($uri)
or $this->returnServerError('No results for Github Issue '.$this->getInput('i').' in project '.$this->getInput('u').'/'.$this->getInput('p'));
@ -60,7 +60,7 @@ class GithubIssueBridge extends BridgeAbstract{
$item['title']=$issue->find('.js-navigation-open',0)->plaintext;
$comments=$issue->find('.col-5',0)->plaintext;
$item['content']='Comments: '.($comments?$comments:'0');
$item['uri']=$this->uri.$issue->find('.js-navigation-open',0)->getAttribute('href');
$item['uri']=self::URI.$issue->find('.js-navigation-open',0)->getAttribute('href');
$this->items[]=$item;
}
break;

View file

@ -1,12 +1,12 @@
<?php
class GitlabCommitsBridge extends BridgeAbstract{
public $maintainer = 'Pierre Mazière';
public $name = 'Gitlab Commits';
public $uri = '';
public $description = 'Returns the commits of a project hosted on a gitlab instance';
const MAINTAINER = 'Pierre Mazière';
const NAME = 'Gitlab Commits';
const URI = '';
const DESCRIPTION = 'Returns the commits of a project hosted on a gitlab instance';
public $parameters = array( array(
const PARAMETERS = array( array(
'uri'=>array(
'name'=>'Base URI',
'defaultValue'=>'https://gitlab.com'

View file

@ -1,10 +1,10 @@
<?php
class GizmodoFRBridge extends BridgeAbstract{
public $maintainer = "polopollo";
public $name = "GizmodoFR";
public $uri = "http://www.gizmodo.fr/";
public $description = "Returns the 15 newest posts from GizmodoFR (full text).";
const MAINTAINER = "polopollo";
const NAME = "GizmodoFR";
const URI = "http://www.gizmodo.fr/";
const DESCRIPTION = "Returns the 15 newest posts from GizmodoFR (full text).";
public function collectData(){
@ -24,8 +24,8 @@ class GizmodoFRBridge extends BridgeAbstract{
return $text;
}
$rssFeed = $this->getSimpleHTMLDOM($this->uri.'/feed')
or $this->returnServerError('Could not request '.$this->uri.'/feed');
$rssFeed = $this->getSimpleHTMLDOM(self::URI.'/feed')
or $this->returnServerError('Could not request '.self::URI.'/feed');
$limit = 0;
foreach($rssFeed->find('item') as $element) {

View file

@ -4,12 +4,12 @@ class GooglePlusPostBridge extends BridgeAbstract
protected $_title;
protected $_url;
public $maintainer = "Grummfy";
public $name = "Google Plus Post Bridge";
public $uri = "https://plus.google.com/";
public $description = "Returns user public post (without API).";
const MAINTAINER = "Grummfy";
const NAME = "Google Plus Post Bridge";
const URI = "https://plus.google.com/";
const DESCRIPTION = "Returns user public post (without API).";
public $parameters = array( array(
const PARAMETERS = array( array(
'username'=>array(
'name'=>'username or Id',
'required'=>true
@ -20,7 +20,7 @@ class GooglePlusPostBridge extends BridgeAbstract
{
// get content parsed
// $html = $this->getSimpleHTMLDOM(__DIR__ . '/../posts2.html'
$html = $this->getSimpleHTMLDOM($this->uri . urlencode($this->getInput('username')) . '/posts'
$html = $this->getSimpleHTMLDOM(self::URI . urlencode($this->getInput('username')) . '/posts'
// force language
, false, stream_context_create(array('http'=> array(
'header' => 'Accept-Language: fr,fr-be,fr-fr;q=0.8,en;q=0.4,en-us;q=0.2;*' . "\r\n"
@ -48,7 +48,7 @@ class GooglePlusPostBridge extends BridgeAbstract
// $item['title'] = $item['fullname'] = $post->find('header.lea', 0)->plaintext;
$item['avatar'] = $post->find('div.ys img', 0)->src;
// var_dump((($post->find('a.o-U-s', 0)->getAllAttributes())));
$item['uri'] = $this->uri . $post->find('a.o-U-s', 0)->href;
$item['uri'] = self::URI . $post->find('a.o-U-s', 0)->href;
$item['timestamp'] = strtotime($post->find('a.o-U-s', 0)->plaintext);
$this->items[] = $item;
@ -56,21 +56,21 @@ class GooglePlusPostBridge extends BridgeAbstract
$hashtags = array();
foreach($post->find('a.d-s') as $hashtag)
{
$hashtags[ trim($hashtag->plaintext) ] = $this->uri . $hashtag->href;
$hashtags[ trim($hashtag->plaintext) ] = self::URI . $hashtag->href;
}
$item['content'] = '';
// avatar display
$item['content'] .= '<div style="float:left; margin: 0 0.5em 0.5em 0;"><a href="' . $this->uri . urlencode($this->getInput('username'));
$item['content'] .= '<div style="float:left; margin: 0 0.5em 0.5em 0;"><a href="' . self::URI . urlencode($this->getInput('username'));
$item['content'] .= '"><img align="top" alt="avatar" src="' . $item['avatar'].'" />' . $item['username'] . '</a></div>';
$content = $post->find('div.Al', 0);
// alter link
// $content = $content->innertext;
// $content = str_replace('href="./', 'href="' . $this->uri, $content);
// $content = str_replace('href="photos', 'href="' . $this->uri . 'photos', $content);
// $content = str_replace('href="./', 'href="' . self::URI, $content);
// $content = str_replace('href="photos', 'href="' . self::URI . 'photos', $content);
// XXX ugly but I don't have any idea how to do a better stuff, str_replace on link doesn't work as expected and ask too many checks
foreach($content->find('a') as $link)
{
@ -86,7 +86,7 @@ class GooglePlusPostBridge extends BridgeAbstract
{
$link->href = substr($link->href, 1);
}
$link->href = $this->uri . $link->href;
$link->href = self::URI . $link->href;
}
}
$content = $content->innertext;
@ -107,7 +107,7 @@ class GooglePlusPostBridge extends BridgeAbstract
public function getURI()
{
return $this->_url ?: $this->uri;
return $this->_url ?: self::URI;
}
public function getCacheDuration()

View file

@ -9,12 +9,12 @@
*/
class GoogleSearchBridge extends BridgeAbstract{
public $maintainer = "sebsauvage";
public $name = "Google search";
public $uri = "https://www.google.com/";
public $description = "Returns most recent results from Google search.";
const MAINTAINER = "sebsauvage";
const NAME = "Google search";
const URI = "https://www.google.com/";
const DESCRIPTION = "Returns most recent results from Google search.";
public $parameters = array( array(
const PARAMETERS = array( array(
'q'=>array(
'name'=>"keyword",
'required'=>true
@ -25,7 +25,7 @@ class GoogleSearchBridge extends BridgeAbstract{
public function collectData(){
$html = '';
$html = $this->getSimpleHTMLDOM($this->uri
$html = $this->getSimpleHTMLDOM(self::URI
.'search?q=' . urlencode($this->getInput('q'))
.'&num=100&complete=0&tbs=qdr:y,sbd:1')
or $this->returnServerError('No results for this query.');

View file

@ -1,10 +1,10 @@
<?php
class GuruMedBridge extends BridgeAbstract{
public $maintainer = "qwertygc";
public $name = "GuruMed";
public $uri = "http://www.gurumed.org";
public $description = "Returns the 5 newest posts from Gurumed (full text)";
const MAINTAINER = "qwertygc";
const NAME = "GuruMed";
const URI = "http://www.gurumed.org";
const DESCRIPTION = "Returns the 5 newest posts from Gurumed (full text)";
private function GurumedStripCDATA($string) {
$string = str_replace('<![CDATA[', '', $string);
@ -13,7 +13,7 @@ class GuruMedBridge extends BridgeAbstract{
}
public function collectData(){
$html = $this->getSimpleHTMLDOM($this->uri.'feed')
$html = $this->getSimpleHTMLDOM(self::URI.'feed')
or $this->returnServerError('Could not request Gurumed.');
$limit = 0;

View file

@ -1,11 +1,11 @@
<?php
class HDWallpapersBridge extends BridgeAbstract {
public $maintainer = "nel50n";
public $name = "HD Wallpapers Bridge";
public $uri = "http://www.hdwallpapers.in/";
public $description = "Returns the latests wallpapers from HDWallpapers";
const MAINTAINER = "nel50n";
const NAME = "HD Wallpapers Bridge";
const URI = "http://www.hdwallpapers.in/";
const DESCRIPTION = "Returns the latests wallpapers from HDWallpapers";
public $parameters = array( array(
const PARAMETERS = array( array(
'c'=>array(
'name'=>'category',
'defaultValue'=>'latest_wallpapers'
@ -29,7 +29,7 @@ class HDWallpapersBridge extends BridgeAbstract {
$lastpage = 1;
for ($page = 1; $page <= $lastpage; $page++) {
$link = $this->uri.'/'.$category.'/page/'.$page;
$link = self::URI.'/'.$category.'/page/'.$page;
$html = $this->getSimpleHTMLDOM($link) or $this->returnServerError('No results for this query.');
if ($page === 1) {
@ -42,10 +42,10 @@ class HDWallpapersBridge extends BridgeAbstract {
$item = array();
// http://www.hdwallpapers.in/download/yosemite_reflections-1680x1050.jpg
$item['uri'] = $this->uri.'/download'.str_replace('wallpapers.html', $this->getInput('r').'.jpg', $element->href);
$item['uri'] = self::URI.'/download'.str_replace('wallpapers.html', $this->getInput('r').'.jpg', $element->href);
$item['timestamp'] = time();
$item['title'] = $element->find('p', 0)->text();
$item['content'] = $item['title'].'<br><a href="'.$item['uri'].'"><img src="'.$this->uri.$thumbnail->src.'" /></a>';
$item['content'] = $item['title'].'<br><a href="'.$item['uri'].'"><img src="'.self::URI.$thumbnail->src.'" /></a>';
$this->items[] = $item;
$num++;

View file

@ -1,13 +1,13 @@
<?php
class HentaiHavenBridge extends BridgeAbstract{
public $maintainer = "albirew";
public $name = "Hentai Haven";
public $uri = "http://hentaihaven.org/";
public $description = "Returns releases from Hentai Haven";
const MAINTAINER = "albirew";
const NAME = "Hentai Haven";
const URI = "http://hentaihaven.org/";
const DESCRIPTION = "Returns releases from Hentai Haven";
public function collectData(){
$html = $this->getSimpleHTMLDOM($this->uri)
$html = $this->getSimpleHTMLDOM(self::URI)
or $this->returnServerError('Could not request Hentai Haven.');
foreach($html->find('div.zoe-grid') as $element) {
$item = array();

View file

@ -1,12 +1,12 @@
<?php
class IdenticaBridge extends BridgeAbstract{
public $maintainer = "mitsukarenai";
public $name = "Identica Bridge";
public $uri = "https://identi.ca/";
public $description = "Returns user timelines";
const MAINTAINER = "mitsukarenai";
const NAME = "Identica Bridge";
const URI = "https://identi.ca/";
const DESCRIPTION = "Returns user timelines";
public $parameters = array( array(
const PARAMETERS = array( array(
'u'=>array(
'name'=>'username',
'required'=>true
@ -32,7 +32,7 @@ class IdenticaBridge extends BridgeAbstract{
}
public function getURI(){
return $this->uri.urlencode($this->getInput('u'));
return self::URI.urlencode($this->getInput('u'));
}
public function getCacheDuration(){

View file

@ -1,12 +1,12 @@
<?php
class InstagramBridge extends BridgeAbstract{
public $maintainer = "pauder";
public $name = "Instagram Bridge";
public $uri = "http://instagram.com/";
public $description = "Returns the newest images";
const MAINTAINER = "pauder";
const NAME = "Instagram Bridge";
const URI = "http://instagram.com/";
const DESCRIPTION = "Returns the newest images";
public $parameters = array( array(
const PARAMETERS = array( array(
'u'=>array(
'name'=>'username',
'required'=>true
@ -46,7 +46,7 @@ class InstagramBridge extends BridgeAbstract{
{
$item = array();
$item['uri'] = $this->uri.'/p/'.$media->code.'/';
$item['uri'] = self::URI.'/p/'.$media->code.'/';
$item['content'] = '<img src="' . htmlentities($media->display_src) . '" />';
if (isset($media->caption))
{
@ -65,7 +65,7 @@ class InstagramBridge extends BridgeAbstract{
}
public function getURI(){
return $this->uri.urlencode($this->getInput('u'));
return self::URI.urlencode($this->getInput('u'));
}
}

View file

@ -1,11 +1,11 @@
<?php
class IsoHuntBridge extends BridgeAbstract{
public $maintainer = 'logmanoriginal';
public $name = 'isoHunt Bridge';
public $uri = 'https://isohunt.to/';
public $description = 'Returns the latest results by category or search result';
const MAINTAINER = 'logmanoriginal';
const NAME = 'isoHunt Bridge';
const URI = 'https://isohunt.to/';
const DESCRIPTION = 'Returns the latest results by category or search result';
public $parameters = array(
const PARAMETERS = array(
/*
* Get feeds for one of the "latest" categories
* Notice: The categories "News" and "Top Searches" are received from the main page
@ -90,7 +90,7 @@ class IsoHuntBridge extends BridgeAbstract{
);
public function getURI(){
$uri=$this->uri;
$uri=self::URI;
switch($this->queriedContext){
case 'By "Latest" category':
switch($this->getInput('latest_category')){
@ -132,27 +132,27 @@ class IsoHuntBridge extends BridgeAbstract{
$categoryName =
array_search(
$this->getInput('latest_category'),
$this->parameters['By "Latest" category']['latest_category']['values']
self::PARAMETERS['By "Latest" category']['latest_category']['values']
);
$name = 'Latest '.$categoryName.' - ' . $this->name;
$name = 'Latest '.$categoryName.' - ' . self::NAME;
break;
case 'By "Torrent" category':
$categoryName =
array_search(
$this->getInput('torrent_category'),
$this->parameters['By "Torrent" category']['torrent_category']['values']
self::PARAMETERS['By "Torrent" category']['torrent_category']['values']
);
$name = 'Category: ' . $categoryName . ' - ' . $this->name;
$name = 'Category: ' . $categoryName . ' - ' . self::NAME;
break;
case 'Search torrent by name':
$categoryName =
array_search(
$this->getInput('search_category'),
$this->parameters['Search torrent by name']['search_category']['values']
self::PARAMETERS['Search torrent by name']['search_category']['values']
);
$name = 'Search: "' . $this->getInput('search_name') . '" in category: ' . $categoryName . ' - ' . $this->name;
$name = 'Search: "' . $this->getInput('search_name') . '" in category: ' . $categoryName . ' - ' . self::NAME;
break;
}
@ -446,7 +446,7 @@ class IsoHuntBridge extends BridgeAbstract{
}
private function fix_relative_uri($uri){
return preg_replace('/\//i', $this->uri, $uri, 1);
return preg_replace('/\//i', self::URI, $uri, 1);
}
private function build_category_uri($category, $order_popularity = false){

View file

@ -1,11 +1,11 @@
<?php
class JapanExpoBridge extends HttpCachingBridgeAbstract {
public $maintainer = 'Ginko';
public $name = 'Japan Expo Actualités';
public $uri = 'http://www.japan-expo-paris.com/fr/actualites';
public $description = 'Returns most recent entries from Japan Expo actualités.';
public $parameters = array( array(
const MAINTAINER = 'Ginko';
const NAME = 'Japan Expo Actualités';
const URI = 'http://www.japan-expo-paris.com/fr/actualites';
const DESCRIPTION = 'Returns most recent entries from Japan Expo actualités.';
const PARAMETERS = array( array(
'mode'=>array(
'name'=>'Show full contents',
'type'=>'checkbox',
@ -42,8 +42,8 @@ class JapanExpoBridge extends HttpCachingBridgeAbstract {
}
};
$html = $this->getSimpleHTMLDOM($this->uri)
or $this->returnServerError('Could not request JapanExpo: '.$this->uri);
$html = $this->getSimpleHTMLDOM(self::URI)
or $this->returnServerError('Could not request JapanExpo: '.self::URI);
$fullcontent = $this->getInput('mode');
$count = 0;

View file

@ -1,12 +1,12 @@
<?php
class KonachanBridge extends BridgeAbstract{
public $maintainer = "mitsukarenai";
public $name = "Konachan";
public $uri = "http://konachan.com/";
public $description = "Returns images from given page";
const MAINTAINER = "mitsukarenai";
const NAME = "Konachan";
const URI = "http://konachan.com/";
const DESCRIPTION = "Returns images from given page";
public $parameters = array( array(
const PARAMETERS = array( array(
'p'=>array(
'name'=>'page',
'defaultValue'=>1,
@ -17,7 +17,7 @@ class KonachanBridge extends BridgeAbstract{
public function collectData(){
$html = $this->getSimpleHTMLDOM(
$this->uri.'/post?'
self::URI.'/post?'
.'&page='.$this->getInput('p')
.'&tags='.urlencode($this->getInput('t'))
) or $this->returnServerError('Could not request Konachan.');
@ -30,7 +30,7 @@ class KonachanBridge extends BridgeAbstract{
foreach($data as $datai) {
$json = json_decode($datai, TRUE);
$item = array();
$item['uri'] = $this->uri.'/post/show/'.$json['id'];
$item['uri'] = self::URI.'/post/show/'.$json['id'];
$item['postid'] = $json['id'];
$item['timestamp'] = $json['created_at'];
$item['imageUri'] = $json['file_url'];

View file

@ -1,10 +1,10 @@
<?php
class KoreusBridge extends BridgeAbstract{
public $maintainer = "pit-fgfjiudghdf";
public $name = "Koreus";
public $uri = "http://www.koreus.com/";
public $description = "Returns the 5 newest posts from Koreus (full text)";
const MAINTAINER = "pit-fgfjiudghdf";
const NAME = "Koreus";
const URI = "http://www.koreus.com/";
const DESCRIPTION = "Returns the 5 newest posts from Koreus (full text)";
private function KoreusStripCDATA($string) {
$string = str_replace('<![CDATA[', '', $string);

View file

@ -1,11 +1,11 @@
<?php
class KununuBridge extends HttpCachingBridgeAbstract {
public $maintainer = "logmanoriginal";
public $name = "Kununu Bridge";
public $uri = "https://www.kununu.com/";
public $description = "Returns the latest reviews for a company and site of your choice.";
const MAINTAINER = "logmanoriginal";
const NAME = "Kununu Bridge";
const URI = "https://www.kununu.com/";
const DESCRIPTION = "Returns the latest reviews for a company and site of your choice.";
public $parameters = array(
const PARAMETERS = array(
'global' => array(
'site'=>array(
'name'=>'Site',
@ -55,12 +55,12 @@ class KununuBridge extends HttpCachingBridgeAbstract {
break;
}
return $this->uri.$site.'/'.$company.'/'.$section;
return self::URI.$site.'/'.$company.'/'.$section;
}
function getName(){
$company = $this->encode_umlauts(strtolower(str_replace(' ', '-', trim($this->getInput('company')))));
return ($this->companyName?:$company).' - '.$this->name;
return ($this->companyName?:$company).' - '.self::NAME;
}
public function collectData(){
@ -109,7 +109,7 @@ class KununuBridge extends HttpCachingBridgeAbstract {
* Fixes relative URLs in the given text
*/
private function fix_url($text){
return preg_replace('/href=(\'|\")\//i', 'href="'.$this->uri, $text);
return preg_replace('/href=(\'|\")\//i', 'href="'.self::URI, $text);
}
/**
@ -184,7 +184,7 @@ class KununuBridge extends HttpCachingBridgeAbstract {
if($anchor === false)
$this->returnServerError('Cannot find article URI!');
return $this->uri . $anchor->href;
return self::URI . $anchor->href;
}
/**

View file

@ -1,12 +1,12 @@
<?php
class LWNprevBridge extends BridgeAbstract{
public $maintainer = 'Pierre Mazière';
public $name = 'LWN Free Weekly Edition';
public $uri = 'https://lwn.net/';
public $description = 'LWN Free Weekly Edition available one week late';
const MAINTAINER = 'Pierre Mazière';
const NAME = 'LWN Free Weekly Edition';
const URI = 'https://lwn.net/';
const DESCRIPTION = 'LWN Free Weekly Edition available one week late';
function getURI(){
return $this->uri.'free/bigpage';
return self::URI.'free/bigpage';
}
private function jumpToNextTag(&$node){
@ -48,7 +48,7 @@ class LWNprevBridge extends BridgeAbstract{
break;
}
}
$realURI=$this->uri.$a->getAttribute('href');
$realURI=self::URI.$a->getAttribute('href');
$URICounter=0;
$edition=$html->getElementsByTagName('h1')->item(0)->textContent;
@ -82,7 +82,7 @@ class LWNprevBridge extends BridgeAbstract{
$h2FirstChild=$h2->firstChild;
$this->jumpToNextTag($h2FirstChild);
if($h2FirstChild->nodeName==='a'){
$item['uri']=$this->uri.$h2FirstChild->getAttribute('href');
$item['uri']=self::URI.$h2FirstChild->getAttribute('href');
}else{
$item['uri']=$realURI.'#'.$URICounter;
}

View file

@ -1,12 +1,12 @@
<?php
class LeBonCoinBridge extends BridgeAbstract{
public $maintainer = "16mhz";
public $name = "LeBonCoin";
public $uri = "http://www.leboncoin.fr/";
public $description = "Returns most recent results from LeBonCoin for a region, and optionally a category and a keyword .";
const MAINTAINER = "16mhz";
const NAME = "LeBonCoin";
const URI = "http://www.leboncoin.fr/";
const DESCRIPTION = "Returns most recent results from LeBonCoin for a region, and optionally a category and a keyword .";
public $parameters = array( array(
const PARAMETERS = array( array(
'k'=>array('name'=>'Mot Clé'),
'r'=>array(
'name'=>'Région',
@ -143,7 +143,7 @@ class LeBonCoinBridge extends BridgeAbstract{
}
$html = $this->getSimpleHTMLDOM(
$this->uri.$category.'/offres/' . $this->getInput('r') . '/?'
self::URI.$category.'/offres/' . $this->getInput('r') . '/?'
.'f=a&th=1&'
.'q=' . urlencode($this->getInput('k'))
) or $this->returnServerError('Could not request LeBonCoin.');

View file

@ -1,10 +1,10 @@
<?php
class LeJournalDuGeekBridge extends BridgeAbstract{
public $maintainer = "polopollo";
public $name = "journaldugeek.com (FR)";
public $uri = "http://www.journaldugeek.com/";
public $description = "Returns the 5 newest posts from LeJournalDuGeek (full text).";
const MAINTAINER = "polopollo";
const NAME = "journaldugeek.com (FR)";
const URI = "http://www.journaldugeek.com/";
const DESCRIPTION = "Returns the 5 newest posts from LeJournalDuGeek (full text).";
private function LeJournalDuGeekStripCDATA($string) {
$string = str_replace('<![CDATA[', '', $string);
@ -35,8 +35,8 @@ class LeJournalDuGeekBridge extends BridgeAbstract{
}
public function collectData(){
$rssFeed = $this->getSimpleHTMLDOM($this->uri.'rss')
or $this->returnServerError('Could not request '.$this->uri.'/rss');
$rssFeed = $this->getSimpleHTMLDOM(self::URI.'rss')
or $this->returnServerError('Could not request '.self::URI.'/rss');
$limit = 0;
foreach($rssFeed->find('item') as $element) {

View file

@ -1,10 +1,10 @@
<?php
class LeMondeInformatiqueBridge extends BridgeAbstract {
public $maintainer = "ORelio";
public $name = "Le Monde Informatique";
public $uri = "http://www.lemondeinformatique.fr/";
public $description = "Returns the newest articles.";
const MAINTAINER = "ORelio";
const NAME = "Le Monde Informatique";
const URI = "http://www.lemondeinformatique.fr/";
const DESCRIPTION = "Returns the newest articles.";
public function collectData(){
@ -28,9 +28,9 @@ class LeMondeInformatiqueBridge extends BridgeAbstract {
return $article_html;
}
$html = $this->getSimpleHTMLDOM($this->uri.'rss/rss.xml')
$html = $this->getSimpleHTMLDOM(self::URI.'rss/rss.xml')
or $this->returnServerError('Could not request LeMondeInformatique: '
.$this->uri.'rss/rss.xml');
.self::URI.'rss/rss.xml');
$limit = 0;
foreach($html->find('item') as $element) {

View file

@ -1,14 +1,14 @@
<?php
class Les400CulsBridge extends RssExpander{
public $maintainer = "unknown";
public $name = "Les 400 Culs";
public $uri = "http://sexes.blogs.liberation.fr/";
public $description = "La planete sexe vue par Agnes Girard via rss-bridge";
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";
public function collectData(){
$this->collectExpandableDatas($this->uri.'feeds/');
$this->collectExpandableDatas(self::URI.'feeds/');
}
protected function parseRSSItem($newsItem) {

View file

@ -1,13 +1,13 @@
<?php
class LesJoiesDuCodeBridge extends BridgeAbstract{
public $maintainer = "superbaillot.net";
public $name = "Les Joies Du Code";
public $uri = "http://lesjoiesducode.fr/";
public $description = "LesJoiesDuCode";
const MAINTAINER = "superbaillot.net";
const NAME = "Les Joies Du Code";
const URI = "http://lesjoiesducode.fr/";
const DESCRIPTION = "LesJoiesDuCode";
public function collectData(){
$html = $this->getSimpleHTMLDOM($this->uri)
$html = $this->getSimpleHTMLDOM(self::URI)
or $this->returnServerError('Could not request LesJoiesDuCode.');
foreach($html->find('div.blog-post') as $element) {

View file

@ -2,14 +2,14 @@
class LichessBridge extends HttpCachingBridgeAbstract
{
public $maintainer = 'AmauryCarrade';
public $name = 'Lichess Blog';
public $uri = 'http://fr.lichess.org/blog';
public $description = 'Returns the 5 newest posts from the Lichess blog (full text)';
const MAINTAINER = 'AmauryCarrade';
const NAME = 'Lichess Blog';
const URI = 'http://fr.lichess.org/blog';
const DESCRIPTION = 'Returns the 5 newest posts from the Lichess blog (full text)';
public function collectData()
{
$xml_feed = $this->getSimpleHTMLDOM($this->uri.'.atom')
$xml_feed = $this->getSimpleHTMLDOM(self::URI.'.atom')
or $this->returnServerError('Could not retrieve Lichess blog feed.');
$posts_loaded = 0;

View file

@ -1,12 +1,12 @@
<?php
class LinkedInCompanyBridge extends BridgeAbstract{
public $maintainer = "regisenguehard";
public $name = "LinkedIn Company";
public $uri = "https://www.linkedin.com/";
public $description = "Returns most recent actus from Company on LinkedIn. (https://www.linkedin.com/company/<strong style=\"font-weight:bold;\">apple</strong>)";
const MAINTAINER = "regisenguehard";
const NAME = "LinkedIn Company";
const URI = "https://www.linkedin.com/";
const DESCRIPTION = "Returns most recent actus from Company on LinkedIn. (https://www.linkedin.com/company/<strong style=\"font-weight:bold;\">apple</strong>)";
public $parameters = array( array(
const PARAMETERS = array( array(
'c'=>array(
'name'=>'Company name',
'required'=>true
@ -15,7 +15,7 @@ class LinkedInCompanyBridge extends BridgeAbstract{
public function collectData(){
$html = '';
$link = $this->uri.'company/'.$this->getInput('c');
$link = self::URI.'company/'.$this->getInput('c');
$html = $this->getSimpleHTMLDOM($link)
or $this->returnServerError('Could not request LinkedIn.');

View file

@ -1,12 +1,12 @@
<?php
class LolibooruBridge extends BridgeAbstract{
public $maintainer = "mitsukarenai";
public $name = "Lolibooru";
public $uri = "http://lolibooru.moe/";
public $description = "Returns images from given page and tags";
const MAINTAINER = "mitsukarenai";
const NAME = "Lolibooru";
const URI = "http://lolibooru.moe/";
const DESCRIPTION = "Returns images from given page and tags";
public $parameters = array( array(
const PARAMETERS = array( array(
'p'=>array(
'name'=>'page',
'defaultValue'=>1,
@ -17,7 +17,7 @@ class LolibooruBridge extends BridgeAbstract{
public function collectData(){
$html = $this->getSimpleHTMLDOM(
$this->uri.'post?'
self::URI.'post?'
.'&page='.$this->getInput('p')
.'&tags='.urlencode($this->getInput('t'))
) or $this->returnServerError('Could not request Lolibooru.');
@ -30,7 +30,7 @@ class LolibooruBridge extends BridgeAbstract{
foreach($data as $datai) {
$json = json_decode($datai, TRUE);
$item = array();
$item['uri'] = $this->uri.'post/show/'.$json['id'];
$item['uri'] = self::URI.'post/show/'.$json['id'];
$item['postid'] = $json['id'];
$item['timestamp'] = $json['created_at'];
$item['imageUri'] = $json['file_url'];

View file

@ -2,12 +2,12 @@
define('MANGAREADER_LIMIT', 10); // The default limit
class MangareaderBridge extends BridgeAbstract{
public $maintainer = "logmanoriginal";
public $name = "Mangareader Bridge";
public $uri = "http://www.mangareader.net/";
public $description = "Returns the latest updates, popular mangas or manga updates (new chapters)";
const MAINTAINER = "logmanoriginal";
const NAME = "Mangareader Bridge";
const URI = "http://www.mangareader.net/";
const DESCRIPTION = "Returns the latest updates, popular mangas or manga updates (new chapters)";
public $parameters = array(
const PARAMETERS = array(
'Get latest updates' => array(),
'Get popular mangas' => array(
'category'=>array(
@ -108,7 +108,7 @@ class MangareaderBridge extends BridgeAbstract{
if (isset($manga) && $chapters->length >= 1){
$item = array();
$item['uri'] = $this->uri. htmlspecialchars($manga->getAttribute('href'));
$item['uri'] = self::URI. htmlspecialchars($manga->getAttribute('href'));
$item['title'] = htmlspecialchars($manga->nodeValue);
// Add each chapter to the feed
@ -118,7 +118,7 @@ class MangareaderBridge extends BridgeAbstract{
if($item['content'] <> ""){
$item['content'] .= "<br>";
}
$item['content'] .= "<a href='" .$this->uri. htmlspecialchars($chapter->getAttribute('href')) . "'>" . htmlspecialchars($chapter->nodeValue) . "</a>";
$item['content'] .= "<a href='" .self::URI. htmlspecialchars($chapter->getAttribute('href')) . "'>" . htmlspecialchars($chapter->nodeValue) . "</a>";
}
$this->items[] = $item;
@ -142,7 +142,7 @@ class MangareaderBridge extends BridgeAbstract{
$item = array();
$item['title'] = htmlspecialchars($xpath->query(".//*[@class='manga_name']//a", $manga)->item(0)->nodeValue);
$item['uri'] = $this->uri . $xpath->query(".//*[@class='manga_name']//a", $manga)->item(0)->getAttribute('href');
$item['uri'] = self::URI . $xpath->query(".//*[@class='manga_name']//a", $manga)->item(0)->getAttribute('href');
$item['author'] = htmlspecialchars($xpath->query("//*[@class='author_name']", $manga)->item(0)->nodeValue);
$item['chaptercount'] = $xpath->query(".//*[@class='chapter_count']", $manga)->item(0)->nodeValue;
$item['genre'] = htmlspecialchars($xpath->query(".//*[@class='manga_genre']", $manga)->item(0)->nodeValue);
@ -170,7 +170,7 @@ class MangareaderBridge extends BridgeAbstract{
foreach ($chapters as $chapter){
$item = array();
$item['title'] = htmlspecialchars($xpath->query("td[1]", $chapter)->item(0)->nodeValue);
$item['uri'] = $this->uri . $xpath->query("td[1]/a", $chapter)->item(0)->getAttribute('href');
$item['uri'] = self::URI . $xpath->query("td[1]/a", $chapter)->item(0)->getAttribute('href');
$item['timestamp'] = strtotime($xpath->query("td[2]", $chapter)->item(0)->nodeValue);
array_unshift($this->items, $item);
}
@ -201,7 +201,7 @@ class MangareaderBridge extends BridgeAbstract{
$path = $this->getInput('path');
break;
}
return $this->uri . $path;
return self::URI . $path;
}

View file

@ -2,12 +2,12 @@
class MilbooruBridge extends BridgeAbstract{
public $maintainer = "mitsukarenai";
public $name = "Milbooru";
public $uri = "http://sheslostcontrol.net/moe/shimmie/";
public $description = "Returns images from given page";
const MAINTAINER = "mitsukarenai";
const NAME = "Milbooru";
const URI = "http://sheslostcontrol.net/moe/shimmie/";
const DESCRIPTION = "Returns images from given page";
public $parameters = array( array(
const PARAMETERS = array( array(
'p'=>array(
'name'=>'page',
'type'=>'number'
@ -17,15 +17,15 @@ class MilbooruBridge extends BridgeAbstract{
public function collectData(){
$html = $this->getSimpleHTMLDOM(
$this->uri.'?q=/post/list/'.urlencode($this->getInput('t')).'/'.$this->getInput('p')
self::URI.'?q=/post/list/'.urlencode($this->getInput('t')).'/'.$this->getInput('p')
)or $this->returnServerError('Could not request Milbooru.');
foreach($html->find('div[class=shm-image-list] span[class=thumb]') as $element) {
$item = array();
$item['uri'] = $this->uri.$element->find('a', 0)->href;
$item['uri'] = self::URI.$element->find('a', 0)->href;
$item['postid'] = (int)preg_replace("/[^0-9]/",'', $element->find('a', 0)->getAttribute('data-post-id'));
$item['timestamp'] = time();
$thumbnailUri = $this->uri.$element->find('img', 0)->src;
$thumbnailUri = self::URI.$element->find('img', 0)->src;
$item['tags'] = $element->find('a', 0)->getAttribute('data-tags');
$item['title'] = 'Milbooru | '.$item['postid'];
$item['content'] = '<a href="' . $item['uri'] . '"><img src="' . $thumbnailUri . '" /></a><br>Tags: '.$item['tags'];

View file

@ -1,19 +1,19 @@
<?php
class MondeDiploBridge extends BridgeAbstract{
public $maintainer = "Pitchoule";
public $name = 'Monde Diplomatique';
public $uri = 'http://www.monde-diplomatique.fr/';
public $description = "Returns most recent results from MondeDiplo.";
const MAINTAINER = "Pitchoule";
const NAME = 'Monde Diplomatique';
const URI = 'http://www.monde-diplomatique.fr/';
const DESCRIPTION = "Returns most recent results from MondeDiplo.";
public function collectData(){
$html = $this->getSimpleHTMLDOM($this->uri)
or $this->returnServerError('Could not request MondeDiplo. for : ' . $this->uri);
$html = $this->getSimpleHTMLDOM(self::URI)
or $this->returnServerError('Could not request MondeDiplo. for : ' . self::URI);
foreach($html->find('div.unarticle') as $article) {
$element = $article->parent();
$item = array();
$item['uri'] = $this->uri . $element->href;
$item['uri'] = self::URI . $element->href;
$item['title'] = $element->find('h3', 0)->plaintext;
$item['content'] = $element->find('div.dates_auteurs', 0)->plaintext . '<br>' . strstr($element->find('div', 0)->plaintext, $element->find('div.dates_auteurs', 0)->plaintext, true);
$this->items[] = $item;

View file

@ -1,13 +1,13 @@
<?php
class MsnMondeBridge extends BridgeAbstract{
public $maintainer = "kranack";
public $name = 'MSN Actu Monde';
public $uri = 'http://www.msn.com/';
public $description = "Returns the 10 newest posts from MSN Actualités (full text)";
const MAINTAINER = "kranack";
const NAME = 'MSN Actu Monde';
const URI = 'http://www.msn.com/';
const DESCRIPTION = "Returns the 10 newest posts from MSN Actualités (full text)";
public function getURI(){
return $this->uri.'fr-fr/actualite/monde';
return self::URI.'fr-fr/actualite/monde';
}
private function MsnMondeExtractContent($url, &$item) {
@ -23,7 +23,7 @@ class MsnMondeBridge extends BridgeAbstract{
if($limit < 10) {
$item = array();
$item['title'] = utf8_decode($article->find('h4', 0)->innertext);
$item['uri'] = $this->uri . utf8_decode($article->find('a', 0)->href);
$item['uri'] = self::URI . utf8_decode($article->find('a', 0)->href);
$this->MsnMondeExtractContent($item['uri'], $item);
$this->items[] = $item;
$limit++;

View file

@ -2,12 +2,12 @@
class MspabooruBridge extends BridgeAbstract{
public $maintainer = "mitsukarenai";
public $name = "Mspabooru";
public $uri = "http://mspabooru.com/";
public $description = "Returns images from given page";
const MAINTAINER = "mitsukarenai";
const NAME = "Mspabooru";
const URI = "http://mspabooru.com/";
const DESCRIPTION = "Returns images from given page";
public $parameters = array( array(
const PARAMETERS = array( array(
'p'=>array(
'name'=>'page',
'type'=>'number'
@ -17,7 +17,7 @@ class MspabooruBridge extends BridgeAbstract{
public function collectData(){
$html = $this->getSimpleHTMLDOM(
$this->uri.'index.php?page=post&s=list&'
self::URI.'index.php?page=post&s=list&'
.'&pid='.($this->getInput('p')?($this->getInput('p') -1)*50:'')
.'&tags='.urlencode($this->getInput('t'))
) or $this->returnServerError('Could not request Mspabooru.');
@ -25,7 +25,7 @@ class MspabooruBridge extends BridgeAbstract{
foreach($html->find('div[class=content] span') as $element) {
$item = array();
$item['uri'] = $this->uri.$element->find('a', 0)->href;
$item['uri'] = self::URI.$element->find('a', 0)->href;
$item['postid'] = (int)preg_replace("/[^0-9]/",'', $element->getAttribute('id'));
$item['timestamp'] = time();
$thumbnailUri = $element->find('img', 0)->src;

View file

@ -1,10 +1,10 @@
<?php
class NakedSecurityBridge extends BridgeAbstract {
public $maintainer = 'ORelio';
public $name = 'Naked Security';
public $uri = 'https://nakedsecurity.sophos.com/';
public $description = 'Returns the newest articles.';
const MAINTAINER = 'ORelio';
const NAME = 'Naked Security';
const URI = 'https://nakedsecurity.sophos.com/';
const DESCRIPTION = 'Returns the newest articles.';
public function collectData(){

View file

@ -1,14 +1,14 @@
<?php
class NasaApodBridge extends BridgeAbstract{
public $maintainer = "corenting";
public $name = "NASA APOD Bridge";
public $uri = "http://apod.nasa.gov/apod/";
public $description = "Returns the 3 latest NASA APOD pictures and explanations";
const MAINTAINER = "corenting";
const NAME = "NASA APOD Bridge";
const URI = "http://apod.nasa.gov/apod/";
const DESCRIPTION = "Returns the 3 latest NASA APOD pictures and explanations";
public function collectData(){
$html = $this->getSimpleHTMLDOM($this->uri.'archivepix.html') or $this->returnServerError('Error while downloading the website content');
$html = $this->getSimpleHTMLDOM(self::URI.'archivepix.html') or $this->returnServerError('Error while downloading the website content');
$list = explode("<br>", $html->find('b', 0)->innertext);
for($i = 0; $i < 3;$i++)
@ -17,7 +17,7 @@ class NasaApodBridge extends BridgeAbstract{
$item = array();
$uri_page = $html->find('a',$i + 3)->href;
$uri = $this->uri.$uri_page;
$uri = self::URI.$uri_page;
$item['uri'] = $uri;
$picture_html = $this->getSimpleHTMLDOM($uri);

View file

@ -1,10 +1,10 @@
<?php
class NeuviemeArtBridge extends BridgeAbstract {
public $maintainer = "ORelio";
public $name = '9ème Art Bridge';
public $uri = "http://www.9emeart.fr/";
public $description = "Returns the newest articles.";
const MAINTAINER = "ORelio";
const NAME = '9ème Art Bridge';
const URI = "http://www.9emeart.fr/";
const DESCRIPTION = "Returns the newest articles.";
public function collectData(){
@ -16,7 +16,7 @@ class NeuviemeArtBridge extends BridgeAbstract {
} return $string;
}
$feedUrl = $this->uri.'9emeart.rss';
$feedUrl = self::URI.'9emeart.rss';
$html = $this->getSimpleHTMLDOM($feedUrl) or $this->returnServerError('Could not request 9eme Art: '.$feedUrl);
$limit = 0;
@ -32,9 +32,9 @@ class NeuviemeArtBridge extends BridgeAbstract {
$article_image = $element->find('enclosure', 0)->url;
foreach ($article_html->find('img.img_full') as $img)
if ($img->alt == $article_title)
$article_image = $this->uri.$img->src;
$article_image = self::URI.$img->src;
$article_content = '<p><img src="'.$article_image.'" /></p>'
.str_replace('src="/', 'src="'.$this->uri, $article_html->find('div.newsGenerique_con', 0)->innertext);
.str_replace('src="/', 'src="'.self::URI, $article_html->find('div.newsGenerique_con', 0)->innertext);
$article_content = StripWithDelimiters($article_content, '<script', '</script>');
$article_content = StripWithDelimiters($article_content, '<style', '</style>');
$article_content = StripWithDelimiters($article_content, '<link', '>');

View file

@ -1,10 +1,10 @@
<?php
class NextInpactBridge extends BridgeAbstract {
public $maintainer = "qwertygc";
public $name = "NextInpact Bridge";
public $uri = "http://www.nextinpact.com/";
public $description = "Returns the newest articles.";
const MAINTAINER = "qwertygc";
const NAME = "NextInpact Bridge";
const URI = "http://www.nextinpact.com/";
const DESCRIPTION = "Returns the newest articles.";
private function StripCDATA($string) {
$string = str_replace('<![CDATA[', '', $string);
@ -24,7 +24,7 @@ class NextInpactBridge extends BridgeAbstract {
}
public function collectData(){
$html = $this->getSimpleHTMLDOM($this->uri.'rss/news.xml') or $this->returnServerError('Could not request NextInpact.');
$html = $this->getSimpleHTMLDOM(self::URI.'rss/news.xml') or $this->returnServerError('Could not request NextInpact.');
$limit = 0;
foreach($html->find('item') as $element) {

View file

@ -1,12 +1,12 @@
<?php
class NextgovBridge extends BridgeAbstract {
public $maintainer = 'ORelio';
public $name = 'Nextgov Bridge';
public $uri = 'https://www.nextgov.com/';
public $description = 'USA Federal technology news, best practices, and web 2.0 tools.';
const MAINTAINER = 'ORelio';
const NAME = 'Nextgov Bridge';
const URI = 'https://www.nextgov.com/';
const DESCRIPTION = 'USA Federal technology news, best practices, and web 2.0 tools.';
public $parameters = array( array(
const PARAMETERS = array( array(
'category'=>array(
'name'=>'Category',
'type'=>'list',

View file

@ -1,10 +1,10 @@
<?php
class NiceMatinBridge extends BridgeAbstract{
public $maintainer = "pit-fgfjiudghdf";
public $name = "NiceMatin";
public $uri = "http://www.nicematin.com/";
public $description = "Returns the 10 newest posts from NiceMatin (full text)";
const MAINTAINER = "pit-fgfjiudghdf";
const NAME = "NiceMatin";
const URI = "http://www.nicematin.com/";
const DESCRIPTION = "Returns the 10 newest posts from NiceMatin (full text)";
private function NiceMatinExtractContent($url) {
$html = $this->getSimpleHTMLDOM($url);
@ -21,7 +21,7 @@ class NiceMatinBridge extends BridgeAbstract{
}
public function collectData(){
$html = $this->getSimpleHTMLDOM($this->uri.'derniere-minute/rss')
$html = $this->getSimpleHTMLDOM(self::URI.'derniere-minute/rss')
or $this->returnServerError('Could not request NiceMatin.');
$limit = 0;

View file

@ -1,11 +1,11 @@
<?php
class NovelUpdatesBridge extends BridgeAbstract{
public $maintainer = "albirew";
public $name = "Novel Updates";
public $uri = "http://www.novelupdates.com/";
public $description = "Returns releases from Novel Updates";
public $parameters = array( array(
const MAINTAINER = "albirew";
const NAME = "Novel Updates";
const URI = "http://www.novelupdates.com/";
const DESCRIPTION = "Returns releases from Novel Updates";
const PARAMETERS = array( array(
'n'=>array(
'name'=>'Novel URL',
'patterns'=>'http:\/\/www.novelupdates.com\/.*',
@ -22,7 +22,7 @@ class NovelUpdatesBridge extends BridgeAbstract{
$this->returnClientError('NovelUpdates URL only.');
if(strpos($thread['path'], 'series/') === FALSE)
$this->returnClientError('You must specify the novel URL.');
$url = $this->uri.$thread['path'].'';
$url = self::URI.$thread['path'].'';
$fullhtml = $this->getSimpleHTMLDOM($url) or $this->returnServerError("Could not request NovelUpdates, novel not found");
$this->seriesTitle = $fullhtml->find('h4.seriestitle', 0)->plaintext;
// dirty fix for nasty simpledom bug: https://github.com/sebsauvage/rss-bridge/issues/259

View file

@ -1,10 +1,10 @@
<?php
class NumeramaBridge extends HttpCachingBridgeAbstract {
public $maintainer = 'mitsukarenai';
public $name = 'Numerama';
public $uri = 'http://www.numerama.com/';
public $description = 'Returns the 5 newest posts from Numerama (full text)';
const MAINTAINER = 'mitsukarenai';
const NAME = 'Numerama';
const URI = 'http://www.numerama.com/';
const DESCRIPTION = 'Returns the 5 newest posts from Numerama (full text)';
public function collectData(){
@ -14,7 +14,7 @@ class NumeramaBridge extends HttpCachingBridgeAbstract {
return $string;
}
$feed = $this->uri.'feed/';
$feed = self::URI.'feed/';
$html = $this->getSimpleHTMLDOM($feed) or $this->returnServerError('Could not request Numerama: '.$feed);
$limit = 0;

View file

@ -1,12 +1,12 @@
<?php
class OpenClassroomsBridge extends BridgeAbstract{
public $maintainer = "sebsauvage";
public $name = "OpenClassrooms Bridge";
public $uri = "https://openclassrooms.com/";
public $description = "Returns latest tutorials from OpenClassrooms.";
const MAINTAINER = "sebsauvage";
const NAME = "OpenClassrooms Bridge";
const URI = "https://openclassrooms.com/";
const DESCRIPTION = "Returns latest tutorials from OpenClassrooms.";
public $parameters = array( array(
const PARAMETERS = array( array(
'u'=>array(
'name'=>'Catégorie',
'type'=>'list',
@ -26,7 +26,7 @@ class OpenClassroomsBridge extends BridgeAbstract{
));
public function getURI(){
return $this->uri.'/courses?categories='.$this->getInput('u').'&'
return self::URI.'/courses?categories='.$this->getInput('u').'&'
.'title=&sort=updatedAt+desc';
}
@ -36,7 +36,7 @@ class OpenClassroomsBridge extends BridgeAbstract{
foreach($html->find('.courseListItem') as $element) {
$item = array();
$item['uri'] = $this->uri.$element->find('a', 0)->href;
$item['uri'] = self::URI.$element->find('a', 0)->href;
$item['title'] = $element->find('h3', 0)->plaintext;
$item['content'] = $element->find('slidingItem__descriptionContent', 0)->plaintext;
$this->items[] = $item;

View file

@ -1,13 +1,13 @@
<?php
class ParuVenduImmoBridge extends BridgeAbstract
{
public $maintainer = "polo2ro";
public $name = "Paru Vendu Immobilier";
public $uri = "http://www.paruvendu.fr";
public $description = "Returns the ads from the first page of search result.";
const MAINTAINER = "polo2ro";
const NAME = "Paru Vendu Immobilier";
const URI = "http://www.paruvendu.fr";
const DESCRIPTION = "Returns the ads from the first page of search result.";
public $parameters = array( array(
const PARAMETERS = array( array(
'minarea'=>array(
'name'=>'Minimal surface m²',
'type'=>'number'
@ -49,7 +49,7 @@ class ParuVenduImmoBridge extends BridgeAbstract
list($href) = explode('#', $element->href);
$item = array();
$item['uri'] = $this->uri.$href;
$item['uri'] = self::URI.$href;
$item['title'] = $element->title;
$item['content'] = $img.$desc.$price;
$this->items[] = $item;
@ -60,7 +60,7 @@ class ParuVenduImmoBridge extends BridgeAbstract
public function getURI(){
$appartment = '&tbApp=1&tbDup=1&tbChb=1&tbLof=1&tbAtl=1&tbPla=1';
$maison = '&tbMai=1&tbVil=1&tbCha=1&tbPro=1&tbHot=1&tbMou=1&tbFer=1';
$link = $this->uri.'/immobilier/annonceimmofo/liste/listeAnnonces?tt=1'.$appartment.$maison;
$link = self::URI.'/immobilier/annonceimmofo/liste/listeAnnonces?tt=1'.$appartment.$maison;
if ($this->getInput('minarea')) {
$link .= '&sur0='.urlencode($this->getInput('minarea'));

View file

@ -1,12 +1,12 @@
<?php
class PickyWallpapersBridge extends BridgeAbstract {
public $maintainer = "nel50n";
public $name = "PickyWallpapers Bridge";
public $uri = "http://www.pickywallpapers.com/";
public $description = "Returns the latests wallpapers from PickyWallpapers";
const MAINTAINER = "nel50n";
const NAME = "PickyWallpapers Bridge";
const URI = "http://www.pickywallpapers.com/";
const DESCRIPTION = "Returns the latests wallpapers from PickyWallpapers";
public $parameters = array( array(
const PARAMETERS = array( array(
'c'=>array(
'name'=>'category',
'required'=>true
@ -44,7 +44,7 @@ class PickyWallpapersBridge extends BridgeAbstract {
foreach($html->find('.items li img') as $element) {
$item = array();
$item['uri'] = str_replace('www', 'wallpaper', $this->uri).'/'.$resolution.'/'.basename($element->src);
$item['uri'] = str_replace('www', 'wallpaper', self::URI).'/'.$resolution.'/'.basename($element->src);
$item['timestamp'] = time();
$item['title'] = $element->alt;
$item['content'] = $item['title'].'<br><a href="'.$item['uri'].'">'.$element.'</a>';
@ -59,7 +59,7 @@ class PickyWallpapersBridge extends BridgeAbstract {
public function getURI(){
$subcategory = $this->getInput('s');
$link = $this->uri.$this->getInput('r').'/'.$this->getInput('c').'/'.$subcategory;
$link = self::URI.$this->getInput('r').'/'.$this->getInput('c').'/'.$subcategory;
return $link;
}

View file

@ -1,12 +1,12 @@
<?php
class PinterestBridge extends BridgeAbstract{
public $maintainer = "pauder";
public $name = "Pinterest Bridge";
public $uri = "http://www.pinterest.com/";
public $description = "Returns the newest images on a board";
const MAINTAINER = "pauder";
const NAME = "Pinterest Bridge";
const URI = "http://www.pinterest.com/";
const DESCRIPTION = "Returns the newest images on a board";
public $parameters = array(
const PARAMETERS = array(
'By username and board' => array(
'u'=>array(
'name'=>'username',
@ -77,10 +77,10 @@ class PinterestBridge extends BridgeAbstract{
public function getURI(){
switch($this->queriedContext){
case 'By username and board':
$uri = $this->uri.urlencode($this->getInput('u')).'/'.urlencode($this->getInput('b'));
$uri = self::URI.urlencode($this->getInput('u')).'/'.urlencode($this->getInput('b'));
break;
case 'From search':
$uri = $this->uri.'search/?q='.urlencode($this->getInput('q'));
$uri = self::URI.'search/?q='.urlencode($this->getInput('q'));
break;
}
@ -96,6 +96,6 @@ class PinterestBridge extends BridgeAbstract{
$specific = $this->getInput('q');
break;
}
return $specific .' - '.$this->name;
return $specific .' - '.self::NAME;
}
}

View file

@ -1,10 +1,10 @@
<?php
class PlanetLibreBridge extends BridgeAbstract{
public $maintainer = "pit-fgfjiudghdf";
public $name = "PlanetLibre";
public $uri = "http://www.planet-libre.org";
public $description = "Returns the 5 newest posts from PlanetLibre (full text)";
const MAINTAINER = "pit-fgfjiudghdf";
const NAME = "PlanetLibre";
const URI = "http://www.planet-libre.org";
const DESCRIPTION = "Returns the 5 newest posts from PlanetLibre (full text)";
private function PlanetLibreExtractContent($url){
$html2 = $this->getSimpleHTMLDOM($url);
@ -13,7 +13,7 @@ class PlanetLibreBridge extends BridgeAbstract{
}
public function collectData(){
$html = $this->getSimpleHTMLDOM($this->uri)
$html = $this->getSimpleHTMLDOM(self::URI)
or $this->returnServerError('Could not request PlanetLibre.');
$limit = 0;
foreach($html->find('div.post') as $element) {

View file

@ -1,19 +1,19 @@
<?php
class ProjectMGameBridge extends BridgeAbstract{
public $maintainer = "corenting";
public $name = "Project M Game Bridge";
public $uri = "http://projectmgame.com/en/";
public $description = "Returns the newest articles.";
const MAINTAINER = "corenting";
const NAME = "Project M Game Bridge";
const URI = "http://projectmgame.com/en/";
const DESCRIPTION = "Returns the newest articles.";
public function collectData(){
$html = $this->getSimpleHTMLDOM($this->uri)
$html = $this->getSimpleHTMLDOM(self::URI)
or $this->returnServerError('Error while downloading the Project M homepage');
foreach($html->find('article') as $article) {
$item = array();
$item['uri'] = $this->uri.$article->find('section div.info_block a',0)->href;
$item['uri'] = self::URI.$article->find('section div.info_block a',0)->href;
$item['title'] = $article->find('h1 p',0)->innertext;
$p_list = $article->find('section p');

View file

@ -1,11 +1,11 @@
<?php
class RTBFBridge extends BridgeAbstract {
public $name = "RTBF Bridge";
public $uri = "http://www.rtbf.be/auvio/emissions/";
public $description = "Returns the newest RTBF videos by series ID";
public $maintainer = "Frenzie";
const NAME = "RTBF Bridge";
const URI = "http://www.rtbf.be/auvio/emissions/";
const DESCRIPTION = "Returns the newest RTBF videos by series ID";
const MAINTAINER = "Frenzie";
public $parameters = array( array(
const PARAMETERS = array( array(
'c'=>array(
'name'=>'series id',
'exampleValue'=>9500,
@ -27,7 +27,7 @@ class RTBFBridge extends BridgeAbstract {
}
$item = array();
$item['id'] = $element->getAttribute('data-id');
$item['uri'] = $this->uri.'detail?id='.$item['id'];
$item['uri'] = self::URI.'detail?id='.$item['id'];
$thumbnailUriSrcSet = explode(',', $element->find('figure .www-img-16by9 img', 0)->getAttribute('data-srcset'));
$thumbnailUriLastSrc = end($thumbnailUriSrcSet);
$thumbnailUri = explode(' ', $thumbnailUriLastSrc)[0];
@ -40,7 +40,7 @@ class RTBFBridge extends BridgeAbstract {
}
public function getURI(){
return $this->uri.'detail?id='.$this->getInput('c');
return self::URI.'detail?id='.$this->getInput('c');
}
public function getName(){

View file

@ -1,10 +1,10 @@
<?php
class Releases3DSBridge extends BridgeAbstract {
public $maintainer = "ORelio";
public $name = "3DS Scene Releases";
public $uri = "http://www.3dsdb.com/";
public $description = "Returns the newest scene releases.";
const MAINTAINER = "ORelio";
const NAME = "3DS Scene Releases";
const URI = "http://www.3dsdb.com/";
const DESCRIPTION = "Returns the newest scene releases.";
public function collectData(){
@ -32,7 +32,7 @@ class Releases3DSBridge extends BridgeAbstract {
}
}
$dataUrl = $this->uri.'xml.php';
$dataUrl = self::URI.'xml.php';
$xml = $this->getContents($dataUrl) or $this->returnServerError('Could not request 3dsdb: '.$dataUrl);
$limit = 0;

View file

@ -1,10 +1,10 @@
<?php
class ReporterreBridge extends BridgeAbstract{
public $maintainer = "nyutag";
public $name = "Reporterre Bridge";
public $uri = "http://www.reporterre.net/";
public $description = "Returns the newest articles.";
const MAINTAINER = "nyutag";
const NAME = "Reporterre Bridge";
const URI = "http://www.reporterre.net/";
const DESCRIPTION = "Returns the newest articles.";
private function ExtractContentReporterre($url) {
$html2 = $this->getSimpleHTMLDOM($url);
@ -17,14 +17,14 @@ class ReporterreBridge extends BridgeAbstract{
unset ($html2);
// Replace all relative urls with absolute ones
$text = preg_replace('/(href|src)(\=[\"\'])(?!http)([^"\']+)/ims', "$1$2" . $this->uri . "$3", $text);
$text = preg_replace('/(href|src)(\=[\"\'])(?!http)([^"\']+)/ims', "$1$2" . self::URI . "$3", $text);
$text = strip_tags($text, '<p><br><a><img>');
return $text;
}
public function collectData(){
$html = $this->getSimpleHTMLDOM($this->uri.'spip.php?page=backend') or $this->returnServerError('Could not request Reporterre.');
$html = $this->getSimpleHTMLDOM(self::URI.'spip.php?page=backend') or $this->returnServerError('Could not request Reporterre.');
$limit = 0;
foreach($html->find('item') as $element) {

View file

@ -1,10 +1,10 @@
<?php
class Rue89Bridge extends BridgeAbstract{
public $maintainer = "pit-fgfjiudghdf";
public $name = "Rue89";
public $uri = "http://rue89.nouvelobs.com/";
public $description = "Returns the 5 newest posts from Rue89 (full text)";
const MAINTAINER = "pit-fgfjiudghdf";
const NAME = "Rue89";
const URI = "http://rue89.nouvelobs.com/";
const DESCRIPTION = "Returns the 5 newest posts from Rue89 (full text)";
private function rue89getDatas($url){

View file

@ -1,12 +1,12 @@
<?php
class Rule34Bridge extends BridgeAbstract{
public $maintainer = "mitsukarenai";
public $name = "Rule34";
public $uri = "http://rule34.xxx/";
public $description = "Returns images from given page";
const MAINTAINER = "mitsukarenai";
const NAME = "Rule34";
const URI = "http://rule34.xxx/";
const DESCRIPTION = "Returns images from given page";
public $parameters = array( array(
const PARAMETERS = array( array(
'p'=>array(
'name'=>'page',
'type'=>'number'
@ -16,7 +16,7 @@ class Rule34Bridge extends BridgeAbstract{
public function collectData(){
$html = $this->getSimpleHTMLDOM(
$this->uri.'index.php?page=post&s=list&'
self::URI.'index.php?page=post&s=list&'
.'&pid='.($this->getInput('p')?($this->getInput('p') -1)*50:'')
.'&tags='.urlencode($this->getInput('t'))
) or $this->returnServerError('Could not request Rule34.');
@ -24,7 +24,7 @@ class Rule34Bridge extends BridgeAbstract{
foreach($html->find('div[class=content] span') as $element) {
$item = array();
$item['uri'] = $this->uri.$element->find('a', 0)->href;
$item['uri'] = self::URI.$element->find('a', 0)->href;
$item['postid'] = (int)preg_replace("/[^0-9]/",'', $element->getAttribute('id'));
$item['timestamp'] = time();
$thumbnailUri = $element->find('img', 0)->src;

View file

@ -1,12 +1,12 @@
<?php
class Rule34pahealBridge extends BridgeAbstract{
public $maintainer = "mitsukarenai";
public $name = "Rule34paheal";
public $uri = "http://rule34.paheal.net/";
public $description = "Returns images from given page";
const MAINTAINER = "mitsukarenai";
const NAME = "Rule34paheal";
const URI = "http://rule34.paheal.net/";
const DESCRIPTION = "Returns images from given page";
public $parameters = array( array(
const PARAMETERS = array( array(
'p'=>array(
'name'=>'page',
'type'=>'number'
@ -16,13 +16,13 @@ class Rule34pahealBridge extends BridgeAbstract{
public function collectData(){
$html = $this->getSimpleHTMLDOM($this->uri.'post/list/'.$tags.'/'.$page)
$html = $this->getSimpleHTMLDOM(self::URI.'post/list/'.$tags.'/'.$page)
or $this->returnServerError('Could not request Rule34paheal.');
foreach($html->find('div[class=shm-image-list] div[class=shm-thumb]') as $element) {
$item = array();
$item['uri'] = $this->uri.$element->find('a', 0)->href;
$item['uri'] = self::URI.$element->find('a', 0)->href;
$item['postid'] = (int)preg_replace("/[^0-9]/",'', $element->find('img', 0)->getAttribute('id'));
$item['timestamp'] = time();
$thumbnailUri = $element->find('img', 0)->src;

View file

@ -1,12 +1,12 @@
<?php
class SafebooruBridge extends BridgeAbstract{
public $maintainer = "mitsukarenai";
public $name = "Safebooru";
public $uri = "http://safebooru.org/";
public $description = "Returns images from given page";
const MAINTAINER = "mitsukarenai";
const NAME = "Safebooru";
const URI = "http://safebooru.org/";
const DESCRIPTION = "Returns images from given page";
public $parameters = array( array(
const PARAMETERS = array( array(
'p'=>array(
'name'=>'page',
'type'=>'number'
@ -16,14 +16,14 @@ class SafebooruBridge extends BridgeAbstract{
public function collectData(){
$html = $this->getSimpleHTMLDOM(
$this->uri.'index.php?page=post&s=list&'
self::URI.'index.php?page=post&s=list&'
.'&pid='.($this->getInput('p')?($this->getInput('p') -1)*40:'')
.'&tags='.urlencode($this->getInput('t'))
) or $this->returnServerError('Could not request Safebooru.');
foreach($html->find('div[class=content] span') as $element) {
$item = array();
$item['uri'] = $this->uri.$element->find('a', 0)->href;
$item['uri'] = self::URI.$element->find('a', 0)->href;
$item['postid'] = (int)preg_replace("/[^0-9]/",'', $element->getAttribute('id'));
$item['timestamp'] = time();
$thumbnailUri = $element->find('img', 0)->src;

View file

@ -1,12 +1,12 @@
<?php
class SakugabooruBridge extends BridgeAbstract{
public $maintainer = "mitsukarenai";
public $name = "Sakugabooru";
public $uri = "http://sakuga.yshi.org/";
public $description = "Returns images from given page";
const MAINTAINER = "mitsukarenai";
const NAME = "Sakugabooru";
const URI = "http://sakuga.yshi.org/";
const DESCRIPTION = "Returns images from given page";
public $parameters = array( array(
const PARAMETERS = array( array(
'p'=>array(
'name'=>'page',
'defaultValue'=>1,
@ -17,7 +17,7 @@ class SakugabooruBridge extends BridgeAbstract{
public function collectData(){
$html = $this->getSimpleHTMLDOM(
$this->uri.'post?'
self::URI.'post?'
.'&page='.$this->getInput('p')
.'&tags='.urlencode($this->getInput('t'))
) or $this->returnServerError('Could not request Sakugabooru.');
@ -30,7 +30,7 @@ class SakugabooruBridge extends BridgeAbstract{
foreach($data as $datai) {
$json = json_decode($datai, TRUE);
$item = array();
$item['uri'] = $this->uri.'/post/show/'.$json['id'];
$item['uri'] = self::URI.'/post/show/'.$json['id'];
$item['postid'] = $json['id'];
$item['timestamp'] = $json['created_at'];
$item['imageUri'] = $json['file_url'];

View file

@ -1,19 +1,19 @@
<?php
class ScmbBridge extends BridgeAbstract{
public $maintainer = "Astalaseven";
public $name = "Se Coucher Moins Bête Bridge";
public $uri = "http://secouchermoinsbete.fr/";
public $description = "Returns the newest anecdotes.";
const MAINTAINER = "Astalaseven";
const NAME = "Se Coucher Moins Bête Bridge";
const URI = "http://secouchermoinsbete.fr/";
const DESCRIPTION = "Returns the newest anecdotes.";
public function collectData(){
$html = '';
$html = $this->getSimpleHTMLDOM($this->uri)
$html = $this->getSimpleHTMLDOM(self::URI)
or $this->returnServerError('Could not request Se Coucher Moins Bete.');
foreach($html->find('article') as $article) {
$item = array();
$item['uri'] = $this->uri.$article->find('p.summary a',0)->href;
$item['uri'] = self::URI.$article->find('p.summary a',0)->href;
$item['title'] = $article->find('header h1 a',0)->innertext;
$article->find('span.read-more',0)->outertext=''; // remove text "En savoir plus" from anecdote content

View file

@ -1,12 +1,12 @@
<?php
class ScoopItBridge extends BridgeAbstract{
public $maintainer = "Pitchoule";
public $name = "ScoopIt";
public $uri = "http://www.scoop.it/";
public $description = "Returns most recent results from ScoopIt.";
const MAINTAINER = "Pitchoule";
const NAME = "ScoopIt";
const URI = "http://www.scoop.it/";
const DESCRIPTION = "Returns most recent results from ScoopIt.";
public $parameters = array( array(
const PARAMETERS = array( array(
'u'=>array(
'name'=>'keyword',
'required'=>true
@ -15,7 +15,7 @@ class ScoopItBridge extends BridgeAbstract{
public function collectData(){
$this->request = $this->getInput('u');
$link = $this->uri.'search?q=' .urlencode($this->getInput('u'));
$link = self::URI.'search?q=' .urlencode($this->getInput('u'));
$html = $this->getSimpleHTMLDOM($link)
or $this->returnServerError('Could not request ScoopIt. for : ' . $link);

View file

@ -1,12 +1,12 @@
<?php
class SensCritiqueBridge extends BridgeAbstract {
public $maintainer = "kranack";
public $name = "Sens Critique";
public $uri = "http://www.senscritique.com/";
public $description = "Sens Critique news";
const MAINTAINER = "kranack";
const NAME = "Sens Critique";
const URI = "http://www.senscritique.com/";
const DESCRIPTION = "Sens Critique news";
public $parameters = array( array(
const PARAMETERS = array( array(
'm'=>array(
'name'=>'Movies',
'type'=>'checkbox'
@ -35,9 +35,9 @@ class SensCritiqueBridge extends BridgeAbstract {
public function collectData(){
$categories=array();
foreach($this->parameters[$this->queriedContext] as $category=>$properties){
foreach(self::PARAMETERS[$this->queriedContext] as $category=>$properties){
if($this->getInput($category)){
$uri=$this->uri;
$uri=self::URI;
switch($category){
case 'm': $uri.='films/cette-semaine'; break;
case 's': $uri.='series/actualite'; break;

View file

@ -1,10 +1,10 @@
<?php
class Sexactu extends BridgeAbstract{
public $maintainer = "Riduidel";
public $name = "Sexactu";
public $uri = "http://www.gqmagazine.fr";
public $description = "Sexactu via rss-bridge";
const MAINTAINER = "Riduidel";
const NAME = "Sexactu";
const URI = "http://www.gqmagazine.fr";
const DESCRIPTION = "Sexactu via rss-bridge";
public function collectData(){
$find = array('janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'novembre', 'décembre');
@ -27,7 +27,7 @@ $replace = array('January', 'February', 'March', 'April', 'May', 'June', 'July',
$titleData = $titleDetails->find('h2', 0)->find('a',0);
$titleTimestamp =$titleDetails->find('h4',0);
$item['title'] = $this->correctCase(trim($titleData->innertext));
$item['uri'] = $this->uri.$titleData->href;
$item['uri'] = self::URI.$titleData->href;
// Fugly date parsing due to the fact my DNS-323 doesn't support php intl extension
$dateText = $titleTimestamp->innertext;
@ -40,7 +40,7 @@ $replace = array('January', 'February', 'March', 'April', 'May', 'June', 'July',
$elementText = $element->find('.text-container', 0);
// don't forget to replace images server url with gq one
foreach($elementText->find('img') as $image) {
$image->src = $this->uri.$image->src;
$image->src = self::URI.$image->src;
}
$item['content'] = $elementText->innertext;
$this->items[] = $item;
@ -53,7 +53,7 @@ $replace = array('January', 'February', 'March', 'April', 'May', 'June', 'July',
}
public function getURI(){
return $this->uri.'/sexactu';
return self::URI.'/sexactu';
}
public function getCacheDuration(){

View file

@ -1,9 +1,9 @@
<?php
class ShanaprojectBridge extends BridgeAbstract {
public $maintainer = 'logmanoriginal';
public $name = 'Shanaproject Bridge';
public $uri = 'http://www.shanaproject.com';
public $description = 'Returns a list of anime from the current Season Anime List';
const MAINTAINER = 'logmanoriginal';
const NAME = 'Shanaproject Bridge';
const URI = 'http://www.shanaproject.com';
const DESCRIPTION = 'Returns a list of anime from the current Season Anime List';
// Returns an html object for the Season Anime List (latest season)
private function LoadSeasonAnimeList(){

Some files were not shown because too many files have changed in this diff Show more