remove bridges already removed upstream

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière 2016-08-18 22:55:16 +02:00
parent 10cd3a61a9
commit be591d19e0
15 changed files with 0 additions and 818 deletions

View file

@ -1,56 +0,0 @@
<?php
class CoinDeskBridge extends BridgeAbstract{
public function loadMetadatas() {
$this->maintainer = "mitsukarenai";
$this->name = "CoinDesk";
$this->uri = "http://www.coindesk.com/";
$this->description = "Returns the 5 newest posts from CoinDesk (full text)";
$this->update = "2014-05-30";
}
public function collectData(array $param){
function CoinDeskStripCDATA($string) {
$string = str_replace('<![CDATA[', '', $string);
$string = str_replace(']]>', '', $string);
return $string;
}
function CoinDeskExtractContent($url) {
$html2 = $this->getSimpleHTMLDOM($url);
$text = $html2->find('div.single-content', 0)->innertext;
$text = strip_tags($text, '<p><a><img>');
return $text;
}
$html = $this->getSimpleHTMLDOM('http://www.coindesk.com/feed/atom/') or $this->returnError('Could not request CoinDesk.', 404);
$limit = 0;
foreach($html->find('entry') as $element) {
if($limit < 5) {
$item = new \Item();
$item->title = CoinDeskStripCDATA($element->find('title', 0)->innertext);
$item->author = $element->find('author', 0)->plaintext;
$item->uri = $element->find('link', 0)->href;
$item->timestamp = strtotime($element->find('published', 0)->plaintext);
$item->content = CoinDeskExtractContent($item->uri);
$this->items[] = $item;
$limit++;
}
}
}
public function getName(){
return 'CoinDesk';
}
public function getURI(){
return 'http://www.coindesk.com/';
}
public function getCacheDuration(){
return 1800; // 30min
}
}

View file

@ -1,56 +0,0 @@
<?php
class FSBridge extends BridgeAbstract{
public function loadMetadatas() {
$this->maintainer = "qwertygc";
$this->name = "Futurasciences";
$this->uri = "http://www.futura-sciences.com";
$this->description = "Returns the 5 newest posts from FS (full text)";
$this->update = "03/11/2015";
}
public function collectData(array $param){
function FS_StripCDATA($string) {
$string = str_replace('<![CDATA[', '', $string);
$string = str_replace(']]>', '', $string);
return $string;
}
function FS_ExtractContent($url) {
$html2 = $this->getSimpleHTMLDOM($url);
$text = $html2->find('div.fiche-actualite', 0)->innertext;
$text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text);
return $text;
}
$html = $this->getSimpleHTMLDOM('http://www.futura-sciences.com/rss/actualites.xml') or $this->returnError('Could not request Futura Sciences.', 404);
$limit = 0;
foreach($html->find('item') as $element) {
if($limit < 5) {
$item = new \Item();
$item->title = FS_StripCDATA($element->find('title', 0)->innertext);
$item->uri = FS_StripCDATA($element->find('guid', 0)->plaintext);
$item->timestamp = strtotime($element->find('pubDate', 0)->plaintext);
$item->content = FS_ExtractContent($item->uri);
$this->items[] = $item;
$limit++;
}
}
}
public function getName(){
return 'Futura Sciences';
}
public function getURI(){
return 'http://www.futura-sciences.com/';
}
public function getCacheDuration(){
return 3600; // 1 hour
// return 0; // 1 hour
}
}

View file

@ -1,69 +0,0 @@
<?php
class FrandroidBridge extends BridgeAbstract
{
public function loadMetadatas() {
$this->maintainer = "Daiyousei";
$this->name = "Frandroid";
$this->uri = "http://www.frandroid.com/";
$this->description = "Returns the RSS feed from Frandroid (full text articles)";
$this->update = "2015-03-05";
}
public function collectData(array $param)
{
function FrandroidStripCDATA($string)
{
$string = str_replace('<![CDATA[', '', $string);
$string = str_replace(']]>', '', $string);
return $string;
}
function FrandroidExtractContent($url)
{
$html2 = $this->getSimpleHTMLDOM($url);
$html3 = $html2->find('div.post-content', 0);
$html3->find('div.no-sidebar-ad-top', 0)->outertext = '';
$ret = $html3->find('div.shortcode-container');
foreach ($ret as $value) {
$value->outertext = '';
}
$html3->find('div#hrr-link', 0)->outertext = '';
$text = $html3->innertext;
$text = strip_tags($text, '<h1><span><h2><p><b><a><blockquote><img><em><ul><ol>');
return $text;
}
$html = $this->getSimpleHTMLDOM('http://feeds.feedburner.com/Frandroid?format=xml') or $this->returnError('Could not request Frandroid.', 404);
$limit = 0;
foreach ($html->find('item') as $element) {
if ($limit < 5) {
$item = new \Item();
$item->title = FrandroidStripCDATA($element->find('title', 0)->innertext);
$item->uri = FrandroidStripCDATA($element->find('guid', 0)->plaintext);
$item->timestamp = strtotime($element->find('pubDate', 0)->plaintext);
$item->content = FrandroidExtractContent($item->uri);
$this->items[] = $item;
$limit++;
}
}
}
public function getName()
{
return 'Frandroid';
}
public function getURI()
{
return 'http://www.frandroid.com/';
}
public function getCacheDuration()
{
return 300; // 5min
}
}

View file

@ -1,55 +0,0 @@
<?php
class LeMotDuJourBridge extends BridgeAbstract{
public function loadMetadatas() {
$this->maintainer = "qwertygc";
$this->name = "LeMotDuJour Bridge";
$this->uri = "http://www.lemotdujour.com/";
$this->description = "Returns the newest articles.";
$this->update = "2014-05-25";
}
public function collectData(array $param){
function StripCDATA($string) {
$string = str_replace('<![CDATA[', '', $string);
$string = str_replace(']]>', '', $string);
return $string;
}
function ExtractContent($url) {
$html2 = $this->getSimpleHTMLDOM($url);
$text = $html2->find('div.single-contenu', 0)->innertext;
return $text;
}
$html = $this->getSimpleHTMLDOM('http://feeds2.feedburner.com/lemotdujour/lemotdujour') or $this->returnError('Could not request LeMotDuJour.', 404);
$limit = 0;
foreach($html->find('item') as $element) {
if($limit < 10) {
$item = new \Item();
$item->title = StripCDATA($element->find('title', 0)->innertext);
$item->uri = StripCDATA($element->find('guid', 0)->plaintext);
$item->timestamp = strtotime($element->find('pubDate', 0)->plaintext);
$item->content = ExtractContent($item->uri);
$this->items[] = $item;
$limit++;
}
}
}
public function getName(){
return 'LeMotDuJour Bridge';
}
public function getURI(){
return 'http://lemotdujour.com/';
}
public function getCacheDuration(){
return 3600*2; // 2 hours
// return 0; // 2 hours
}
}

View file

@ -1,60 +0,0 @@
<?php
class MalikiBridge extends BridgeAbstract{
public function loadMetadatas() {
$this->maintainer = "mitsukarenai";
$this->name = "Maliki";
$this->uri = "http://www.maliki.com/";
$this->description = "Returns Maliki's newest strips";
$this->update = "2014-05-30";
}
public function collectData(array $param){
$html = $this->getSimpleHTMLDOM('http://www.maliki.com/') or $this->returnError('Could not request Maliki.', 404);
$count=0;
$latest=1; $latest_title="";
$latest = $html->find('div.conteneur_page a', 1)->href;
$latest_title = $html->find('div.conteneur_page img', 0)->title;
function MalikiExtractContent($url) {
$html2 = $this->getSimpleHTMLDOM($url);
$text = 'http://www.maliki.com/'.$html2->find('img', 0)->src;
$text = '<img alt="" src="'.$text.'"/><br>'.$html2->find('div.imageetnews', 0)->plaintext;
return $text;
}
$item = new \Item();
$item->uri = 'http://www.maliki.com/'.$latest;
$item->title = $latest_title;
$item->timestamp = time();
$item->content = MalikiExtractContent($item->uri);
$this->items[] = $item;
foreach($html->find('div.boite_strip') as $element) {
if(!empty($element->find('a',0)->href) and $count < 3) {
$item = new \Item();
$item->uri = 'http://www.maliki.com/'.$element->find('a',0)->href;
$item->title = $element->find('img',0)->title;
$item->timestamp = strtotime(str_replace('/', '-', $element->find('span.stylepetit', 0)->innertext));
$item->content = MalikiExtractContent($item->uri);
$this->items[] = $item;
$count++;
}
}
}
public function getName(){
return 'Maliki';
}
public function getURI(){
return 'http://www.maliki.com/';
}
public function getCacheDuration(){
return 86400*6; // 6 days
}
}

View file

@ -1,58 +0,0 @@
<?php
class MemoLinuxBridge extends BridgeAbstract{
public function loadMetadatas() {
$this->maintainer = "qwertygc";
$this->name = "MemoLinux";
$this->uri = "http://memo-linux.com/";
$this->description = "Returns the 10 newest posts from MemoLinux (full text)";
$this->update = "2015-01-30";
}
public function collectData(array $param){
function StripCDATA($string) {
$string = str_replace('<![CDATA[', '', $string);
$string = str_replace(']]>', '', $string);
return $string;
}
function ExtractContent($url) {
$html2 = $this->getSimpleHTMLDOM($url);
$text = $html2->find('div.entry-content', 0)->innertext;
$text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text);
$text = preg_replace('@<div[^>]*?>.*?</div>@si', '', $text);
$text = preg_replace("/<h1.*/", '', $text);
return $text;
}
$html = $this->getSimpleHTMLDOM('http://memo-linux.com/feed/') or $this->returnError('Could not request MemoLinux.', 404);
$limit = 0;
foreach($html->find('item') as $element) {
if($limit < 10) {
$item = new \Item();
$item->title = StripCDATA($element->find('title', 0)->innertext);
$item->uri = StripCDATA($element->find('guid', 0)->plaintext);
$item->timestamp = strtotime($element->find('pubDate', 0)->plaintext);
$item->content = ExtractContent($item->uri);
$this->items[] = $item;
$limit++;
}
}
}
public function getName(){
return 'MemoLinux';
}
public function getURI(){
return 'http://memo-linux.com/feed/';
}
public function getCacheDuration(){
return 3600*12; // 12 hours
}
}

View file

@ -1,56 +0,0 @@
<?php
class OpenTheoryBridge extends BridgeAbstract{
public function loadMetadatas() {
$this->maintainer = "qwertygc";
$this->name = "Opentheory";
$this->uri = "http://open1theory.com";
$this->description = "Returns the 5 newest posts from OpenTheory (full text)";
$this->update = "02-08-2014";
}
public function collectData(array $param){
function StripCDATA($string) {
$string = str_replace('<![CDATA[', '', $string);
$string = str_replace(']]>', '', $string);
return $string;
}
function ExtractContent($url) {
$html2 = $this->getSimpleHTMLDOM($url);
$text = $html2->find('div.entry-content', 0)->innertext;
$text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text);
return $text;
}
$html = $this->getSimpleHTMLDOM('http://open1theory.com/feed') or $this->returnError('Could not request OpenTheory.', 404);
$limit = 0;
foreach($html->find('item') as $element) {
if($limit < 5) {
$item = new \Item();
$item->title = StripCDATA($element->find('title', 0)->innertext);
$item->uri = StripCDATA($element->find('guid', 0)->plaintext);
$item->timestamp = strtotime($element->find('pubDate', 0)->plaintext);
$item->content = ExtractContent($item->uri);
$this->items[] = $item;
$limit++;
}
}
}
public function getName(){
return 'OpenTheory';
}
public function getURI(){
return 'http://open1theory.com/feed';
}
public function getCacheDuration(){
return 3600; // 1 hour
// return 0; // 1 hour
}
}

View file

@ -1,53 +0,0 @@
<?php
class RaymondBridge extends BridgeAbstract{
public function loadMetadatas() {
$this->maintainer = "pit-fgfjiudghdf";
$this->name = "Raymond";
$this->uri = "http://www.raymond.cc";
$this->description = "Returns the 3 newest posts from Raymond.cc (full text)";
$this->update = "2014-05-26";
}
public function collectData(array $param){
function raymondStripCDATA($string) {
$string = str_replace('<![CDATA[', '', $string);
$string = str_replace(']]>', '', $string);
return $string;
}
function raymondExtractContent($url) {
$html2 = $this->getSimpleHTMLDOM($url);
$text = $html2->find('div.entry-content', 0)->innertext;
$text = preg_replace('/class="ad".*/', '', $text);
$text = strip_tags($text, '<p><a><i><strong><em><img>');
$text = str_replace('(adsbygoogle = window.adsbygoogle || []).push({});', '', $text);
return $text;
}
$html = $this->getSimpleHTMLDOM('http://www.raymond.cc/blog/feed') or $this->returnError('Could not request raymond.', 404);
$limit = 0;
foreach($html->find('item') as $element) {
if($limit < 3) {
$item = new \Item();
$item->title = raymondStripCDATA($element->find('title', 0)->innertext);
$item->uri = raymondStripCDATA($element->find('guid', 0)->plaintext);
$item->timestamp = strtotime($element->find('pubDate', 0)->plaintext);
$item->content = raymondExtractContent($item->uri);
$this->items[] = $item;
$limit++;
}
}
}
public function getName(){
return 'raymond';
}
public function getURI(){
return 'http://www.raymond.cc/blog';
}
public function getCacheDuration(){
return 3600*12; // 12 hour
}
}

View file

@ -1,54 +0,0 @@
<?php
class ScilogsBridge extends BridgeAbstract{
public function loadMetadatas() {
$this->maintainer = "qwertygc";
$this->name = "Scilogs Bridge";
$this->uri = "http://www.scilogs.fr/";
$this->description = "Returns the newest articles.";
$this->update = "2014-05-25";
}
public function collectData(array $param){
function ScilogsStripCDATA($string) {
$string = str_replace('<![CDATA[', '', $string);
$string = str_replace(']]>', '', $string);
return $string;
}
function ScilogsExtractContent($url) {
$html2 = $this->getSimpleHTMLDOM($url);
$text = $html2->find('div.entrybody', 0)->innertext;
return $text;
}
$html = $this->getSimpleHTMLDOM('http://www.scilogs.fr/?wpmu-feed=posts') or $this->returnError('Could not request Scilogs.', 404);
$limit = 0;
foreach($html->find('item') as $element) {
if($limit < 10) {
$item = new \Item();
$item->title = ScilogsStripCDATA($element->find('title', 0)->innertext);
$item->uri = ScilogsStripCDATA($element->find('guid', 0)->plaintext);
$item->timestamp = strtotime($element->find('pubDate', 0)->plaintext);
$item->content = ScilogsExtractContent($item->uri);
$this->items[] = $item;
$limit++;
}
}
}
public function getName(){
return 'Scilogs Bridge';
}
public function getURI(){
return 'http://scilogs.fr/';
}
public function getCacheDuration(){
return 3600*2; // 2 hours
}
}

View file

@ -1,55 +0,0 @@
<?php
class SegfaultMintBridge extends BridgeAbstract{
public function loadMetadatas() {
$this->maintainer = "qwertygc";
$this->name = "SegfaultMint";
$this->uri = "http://segfault.linuxmint.com/";
$this->description = "Returns the 5 newest posts from SegfaultMint (full text)";
$this->update = "2014-07-05";
}
public function collectData(array $param){
function StripCDATA($string) {
$string = str_replace('<![CDATA[', '', $string);
$string = str_replace(']]>', '', $string);
return $string;
}
function ExtractContent($url) {
$html2 = $this->getSimpleHTMLDOM($url);
$text = $html2->find('div.post-bodycopy', 0)->innertext;
$text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text);
return $text;
}
$html = $this->getSimpleHTMLDOM('http://segfault.linuxmint.com/feed/') or $this->returnError('Could not request segfault.', 404);
$limit = 0;
foreach($html->find('item') as $element) {
if($limit < 5) {
$item = new \Item();
$item->title = StripCDATA($element->find('title', 0)->innertext);
$item->uri = StripCDATA($element->find('guid', 0)->plaintext);
$item->timestamp = strtotime($element->find('pubDate', 0)->plaintext);
$item->content = ExtractContent($item->uri);
$this->items[] = $item;
$limit++;
}
}
}
public function getName(){
return 'Segfault Mint';
}
public function getURI(){
return 'http://segfault.linuxmint.com/feed/';
}
public function getCacheDuration(){
return 3600*24; // 24 hours
}
}

View file

@ -1,64 +0,0 @@
<?php
class TuxboardBridge extends BridgeAbstract{
public function loadMetadatas() {
$this->maintainer = "superbaillot.net";
$this->name = "Tuxboard";
$this->uri = "http://www.tuxboard.com/";
$this->description = "Tuxboard";
$this->update = "2014-07-08";
}
public function collectData(array $param){
function StripCDATA($string) {
$string = str_replace('<![CDATA[', '', $string);
$string = str_replace(']]>', '', $string);
return $string;
}
function ExtractContent($url) {
$html2 = $this->getSimpleHTMLDOM($url);
$text = $html2->find('article#page', 0)->innertext;
$text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text);
return $text;
}
$html = $this->getSimpleHTMLDOM('http://www.tuxboard.com/feed/atom/') or $this->returnError('Could not request Tuxboard.', 404);
$limit = 0;
foreach($html->find('entry') as $element) {
if($limit < 10) {
$item = new \Item();
$item->title = StripCDATA($element->find('title', 0)->innertext);
$item->uri = $element->find('link', 0)->href;
$item->timestamp = strtotime($element->find('published', 0)->plaintext);
$item->content = ExtractContent($item->uri);
$this->items[] = $item;
$limit++;
}
}
}
public function getName(){
return 'Tuxboard';
}
public function getURI(){
return 'http://www.tuxboard.com';
}
public function getDescription(){
return 'Tuxboard via rss-bridge';
}
public function getCacheDuration(){
return 3600; // 1 hour
}
}
?>

View file

@ -1,48 +0,0 @@
<?php
class WikipediaDEBridge extends BridgeAbstract{
public function loadMetadatas() {
$this->maintainer = "cnlpete";
$this->name = "Wikipedia DE Today's Featured Article...";
$this->uri = "https://de.wikipedia.org/";
$this->description = "Returns the highlighted en.wikipedia.org article.";
$this->update = "2015-11-04";
}
public function collectData(array $param){
$html = '';
$host = 'http://de.wikipedia.org';
// If you want HTTPS access instead, uncomment the following line:
//$host = 'https://de.wikipedia.org';
$link = '/wiki/Wikipedia:Hauptseite';
$html = $this->getSimpleHTMLDOM($host.$link) or $this->returnError('Could not request Wikipedia DE.', 404);
$element = $html->find('div[id=mf-tfa]', 0);
$element->find('div', -1)->outertext = '';
$item = new \Item();
$item->uri = $host.$element->find('p', 0)->find('a', 0)->href;
$item->title = $element->find('p',0)->find('a',0)->title;
$html2 = $this->getSimpleHTMLDOM($item->uri) or $this->returnError('Could not request Wikipedia DE '.$item->title.'.', 404);
$element2 = $html2->find('div[id=mw-content-text]', 0);
$item->content = str_replace('href="/', 'href="'.$host.'/', $element2->innertext);
$this->items[] = $item;
}
public function getName(){
return 'Wikipedia DE "Today\'s Featured Article"';
}
public function getURI(){
return 'https://de.wikipedia.org/wiki/Wikipedia:Hauptseite';
}
public function getCacheDuration(){
return 3600*8; // 8 hours
}
}

View file

@ -1,44 +0,0 @@
<?php
class WikipediaENBridge extends BridgeAbstract{
public function loadMetadatas() {
$this->maintainer = "gsurrel";
$this->name = "Wikipedia EN 'Today's Featured Article...'";
$this->uri = "https://en.wikipedia.org/";
$this->description = "Returns the highlighted en.wikipedia.org article.";
$this->update = "2014-05-25";
}
public function collectData(array $param){
$html = '';
$host = 'http://en.wikipedia.org';
// If you want HTTPS access instead, uncomment the following line:
//$host = 'https://en.wikipedia.org';
$link = '/wiki/Main_Page';
$html = $this->getSimpleHTMLDOM($host.$link) or $this->returnError('Could not request Wikipedia EN.', 404);
$element = $html->find('div[id=mp-tfa]', 0);
// Clean the bottom of the featured article
$element->find('div', -1)->outertext = '';
$item = new \Item();
$item->uri = $host.$element->find('p', 0)->find('a', 0)->href;
$item->title = $element->find('p',0)->find('a',0)->title;
$item->content = str_replace('href="/', 'href="'.$host.'/', $element->innertext);
$this->items[] = $item;
}
public function getName(){
return 'Wikipedia EN "Today\'s Featued Article"';
}
public function getURI(){
return 'https://en.wikipedia.org/wiki/Main_Page';
}
public function getCacheDuration(){
return 3600*4; // 4 hours
}
}

View file

@ -1,44 +0,0 @@
<?php
class WikipediaEOBridge extends BridgeAbstract{
public function loadMetadatas() {
$this->maintainer = "gsurrel";
$this->name = "Wikipedia EO 'Artikolo de la semajno'";
$this->uri = "https://eo.wikipedia.org/";
$this->description = "Returns the highlighted eo.wikipedia.org article.";
$this->update = "2014-05-25";
}
public function collectData(array $param){
$html = '';
$host = 'http://eo.wikipedia.org';
// If you want HTTPS access instead, uncomment the following line:
//$host = 'https://eo.wikipedia.org';
$link = '/wiki/Vikipedio:%C4%88efpa%C4%9Do';
$html = $this->getSimpleHTMLDOM($host.$link) or $this->returnError('Could not request Wikipedia EO.', 404);
$element = $html->find('div[id=mf-tfa]', 0);
// Link to article
$link = $element->find('p', -2)->find('a', 0);
$item = new \Item();
$item->uri = $host.$link->href;
$item->title = $link->title;
$item->content = str_replace('href="/', 'href="'.$host.'/', $element->innertext);
$this->items[] = $item;
}
public function getName(){
return 'Wikipedia EO "Artikolo de la semajno"';
}
public function getURI(){
return 'https://eo.wikipedia.org/wiki/Vikipedio:%C4%88efpa%C4%9Do';
}
public function getCacheDuration(){
return 3600*12; // 12 hours
}
}

View file

@ -1,46 +0,0 @@
<?php
class WikipediaFRBridge extends BridgeAbstract{
public function loadMetadatas() {
$this->maintainer = "gsurrel";
$this->name = "Wikipedia FR 'Lumière sur...'";
$this->uri = "https://fr.wikipedia.org/";
$this->description = "Returns the highlighted fr.wikipedia.org article.";
$this->update = "2016-06-04";
}
public function collectData(array $param){
$html = '';
$host = 'http://fr.wikipedia.org';
// If you want HTTPS access instead, uncomment the following line:
//$host = 'https://fr.wikipedia.org';
$link = '/wiki/Wikip%C3%A9dia:Accueil_principal';
$html = $this->getSimpleHTMLDOM($host.$link) or $this->returnError('Could not request Wikipedia FR.', 404);
$element = $html->find('div[id=mf-lumieresur]', 0);
# Use the "Lire la suite" link to dependably get the title of the article
# usually it's a child of a li.BA element (Bon article)
# occasionally it's a li.AdQ (Article de qualité)
$lirelasuite_link = $element->find('.BA > i > a, .AdQ > i > a', 0);
$item = new \Item();
$item->uri = $host.$lirelasuite_link->href;
$item->title = $lirelasuite_link->title;
$item->content = str_replace('href="/', 'href="'.$host.'/', $element->innertext);
$this->items[] = $item;
}
public function getName(){
return 'Wikipedia FR "Lumière sur..."';
}
public function getURI(){
return 'https://fr.wikipedia.org/wiki/Wikip%C3%A9dia:Accueil_principal';
}
public function getCacheDuration(){
return 3600*4; // 4 hours
}
}