(some cleanup)

This commit is contained in:
Mitsukarenai 2015-06-04 17:06:14 +02:00
parent 54c5e9f5ea
commit c16747757d
6 changed files with 7 additions and 104 deletions

View file

@ -1,43 +0,0 @@
<?php
/**
*
* @name Dilbert Daily Strip
* @description The Unofficial Dilbert Daily Comic Strip RSS Feed via rss-bridge
* @update 16/10/2013
*/
class Dilbert extends BridgeAbstract{
public function collectData(array $param){
$html = file_get_html('http://dilbert.com/strips/') or $this->returnError('Could not request Dilbert.', 404);
foreach($html->find('div.STR_Image') as $element) {
$item = new Item();
$href = $element->find('a',0)->href;
$item->uri = 'http://dilbert.com' . $href;
$content = str_replace('src="/', 'src="http://dilbert.com/',$element->innertext);
$content = str_replace('href="/', 'href="http://dilbert.com/',$content);
$item->content = $content;
$time = strtotime(substr($href, (strrpos($href, "/", -10) + 1), 10));
$item->title = date("d/m/Y", $time);
$item->timestamp = $time;
$this->items[] = $item;
}
}
public function getName(){
return 'Dilbert';
}
public function getURI(){
return 'http://dilbert.com';
}
public function getDescription(){
return 'Dilbert via rss-bridge';
}
public function getCacheDuration(){
return 14400; // 4 hours
}
}

View file

@ -2,7 +2,7 @@
/**
*
* @name Freenews
* @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.
* @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.
* @update 26/03/2014
* @use1(id="Id de la rubrique (sans le '-')")
*/

View file

@ -2,7 +2,7 @@
/**
*
* @name Les 400 Culs
* @description La planète sexe vue par Agnès Girard via rss-bridge
* @description La planète sexe vue par Agnès Girard via rss-bridge
* @update 20/02/2014
*/
require_once 'bridges/RssExpander.php';

View file

@ -1,55 +0,0 @@
<?php
/**
*
* @name Les Joies Du Code
* @description LesJoiesDuCode via rss-bridge
* @update 30/01/2014
*/
class LesJoiesDuCode extends BridgeAbstract{
public function collectData(array $param){
$html = file_get_html('http://lesjoiesducode.fr/') or $this->returnError('Could not request LesJoiesDuCode.', 404);
foreach($html->find('div.post') as $element) {
$item = new Item();
$temp = $element->find('h3 a', 0);
$titre = $temp->innertext;
$url = $temp->href;
$temp = $element->find('div.bodytype', 0);
$content = $temp->innertext;
$auteur = $temp->find('.c1 em', 0);
$pos = strpos($auteur->innertext, "by");
if($pos > 0)
{
$auteur = trim(str_replace("*/", "", substr($auteur->innertext, ($pos + 2))));
$item->name = $auteur;
}
$item->content .= trim($content);
$item->uri = $url;
$item->title = trim($titre);
$this->items[] = $item;
}
}
public function getName(){
return 'Les Joies Du Code';
}
public function getURI(){
return 'http://lesjoiesducode.fr/';
}
public function getCacheDuration(){
return 7200; // 2h hours
}
public function getDescription(){
return "Les Joies Du Code via rss-bridge";
}
}

View file

@ -4,6 +4,7 @@
* Returns the 5 newest posts from http://rue89.nouvelobs.com/ (full text)
*
* @name Rue89
* @homepage http://rue89.nouvelobs.com/
* @description Returns the 5 newest posts from Rue89 (full text)
* @update 2015-01-30
* @maintainer pit-fgfjiudghdf

View file

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