1
0
Fork 0
forked from blallo/rss-bridge

bridges: Change ->name to ->author

This commit is contained in:
logmanoriginal 2016-08-09 14:54:44 +02:00
parent 4806092b9f
commit e329a4c1b6
22 changed files with 46 additions and 47 deletions

View file

@ -9,7 +9,7 @@ class ABCTabsBridge extends BridgeAbstract{
$this->name = "ABC Tabs Bridge"; $this->name = "ABC Tabs Bridge";
$this->uri = "http://www.abc-tabs.com/"; $this->uri = "http://www.abc-tabs.com/";
$this->description = "Returns 22 newest tabs"; $this->description = "Returns 22 newest tabs";
$this->update = "2016-08-06"; $this->update = "2016-08-09";
} }
@ -21,7 +21,7 @@ class ABCTabsBridge extends BridgeAbstract{
foreach ($table->find('tr') as $tab) foreach ($table->find('tr') as $tab)
{ {
$item = new \Item(); $item = new \Item();
$item->name = $tab->find('td', 1)->plaintext . ' - ' . $tab->find('td', 2)->plaintext; $item->author = $tab->find('td', 1)->plaintext . ' - ' . $tab->find('td', 2)->plaintext;
$item->title = $tab->find('td', 1)->plaintext . ' - ' . $tab->find('td', 2)->plaintext; $item->title = $tab->find('td', 1)->plaintext . ' - ' . $tab->find('td', 2)->plaintext;
$item->content = 'Le ' . $tab->find('td', 0)->plaintext . '<br> Par: ' . $tab->find('td', 5)->plaintext . '<br> Type: ' . $tab->find('td', 3)->plaintext; $item->content = 'Le ' . $tab->find('td', 0)->plaintext . '<br> Par: ' . $tab->find('td', 5)->plaintext . '<br> Type: ' . $tab->find('td', 3)->plaintext;
$item->id = 'http://www.abc-tabs.com' . $tab->find('td', 2)->find('a', 0)->getAttribute('href'); $item->id = 'http://www.abc-tabs.com' . $tab->find('td', 2)->find('a', 0)->getAttribute('href');

View file

@ -9,7 +9,7 @@ class BandcampBridge extends BridgeAbstract{
$this->name = "Bandcamp Tag"; $this->name = "Bandcamp Tag";
$this->uri = "http://bandcamp.com/"; $this->uri = "http://bandcamp.com/";
$this->description = "New bandcamp release by tag"; $this->description = "New bandcamp release by tag";
$this->update = "2014-05-25"; $this->update = "2016-08-09";
$this->parameters[] = $this->parameters[] =
'[ '[
@ -38,7 +38,7 @@ class BandcampBridge extends BridgeAbstract{
$uri = rtrim($uri, "')"); $uri = rtrim($uri, "')");
$item = new \Item(); $item = new \Item();
$item->name = $release->find('div.itemsubtext',0)->plaintext . ' - ' . $release->find('div.itemtext',0)->plaintext; $item->author = $release->find('div.itemsubtext',0)->plaintext . ' - ' . $release->find('div.itemtext',0)->plaintext;
$item->title = $release->find('div.itemsubtext',0)->plaintext . ' - ' . $release->find('div.itemtext',0)->plaintext; $item->title = $release->find('div.itemsubtext',0)->plaintext . ' - ' . $release->find('div.itemtext',0)->plaintext;
$item->content = '<img src="' . $uri . '"/><br/>' . $release->find('div.itemsubtext',0)->plaintext . ' - ' . $release->find('div.itemtext',0)->plaintext; $item->content = '<img src="' . $uri . '"/><br/>' . $release->find('div.itemsubtext',0)->plaintext . ' - ' . $release->find('div.itemtext',0)->plaintext;
$item->id = $release->find('a',0)->getAttribute('href'); $item->id = $release->find('a',0)->getAttribute('href');

View file

@ -7,7 +7,7 @@ class BlaguesDeMerdeBridge extends BridgeAbstract{
$this->name = "Blagues De Merde"; $this->name = "Blagues De Merde";
$this->uri = "http://www.blaguesdemerde.fr/"; $this->uri = "http://www.blaguesdemerde.fr/";
$this->description = "Blagues De Merde"; $this->description = "Blagues De Merde";
$this->update = "2016-08-06"; $this->update = "2016-08-09";
} }
@ -26,7 +26,7 @@ class BlaguesDeMerdeBridge extends BridgeAbstract{
$date = $element->find("li.bdm_date",0)->innertext; $date = $element->find("li.bdm_date",0)->innertext;
$time = mktime(0, 0, 0, substr($date, 3, 2), substr($date, 0, 2), substr($date, 6, 4)); $time = mktime(0, 0, 0, substr($date, 3, 2), substr($date, 0, 2), substr($date, 6, 4));
$item->timestamp = $time; $item->timestamp = $time;
$item->name = $element->find("li.bdm_pseudo",0)->innertext;; $item->author = $element->find("li.bdm_pseudo",0)->innertext;;
$this->items[] = $item; $this->items[] = $item;
} }
} }

View file

@ -24,7 +24,7 @@ class CpasbienBridge extends HttpCachingBridgeAbstract{
$this->name = "Cpasbien Bridge"; $this->name = "Cpasbien Bridge";
$this->uri = "http://www.cpasbien.io"; $this->uri = "http://www.cpasbien.io";
$this->description = "Returns latest torrents from a request query"; $this->description = "Returns latest torrents from a request query";
$this->update = "2016-08-06"; $this->update = "2016-08-09";
$this->parameters[] = $this->parameters[] =
'[ '[
@ -57,7 +57,7 @@ class CpasbienBridge extends HttpCachingBridgeAbstract{
$htmlepisode=content_get_html($this->get_cached($episode->find('a', 0)->getAttribute('href'))); $htmlepisode=content_get_html($this->get_cached($episode->find('a', 0)->getAttribute('href')));
$item = new \Item(); $item = new \Item();
$item->name = $episode->find('a', 0)->text(); $item->author = $episode->find('a', 0)->text();
$item->title = $episode->find('a', 0)->text(); $item->title = $episode->find('a', 0)->text();
$item->timestamp = $this->get_cached_time($episode->find('a', 0)->getAttribute('href')); $item->timestamp = $this->get_cached_time($episode->find('a', 0)->getAttribute('href'));
$textefiche=$htmlepisode->find('#textefiche', 0)->find('p',1); $textefiche=$htmlepisode->find('#textefiche', 0)->find('p',1);

View file

@ -7,7 +7,7 @@ class DemoBridge extends BridgeAbstract{
$this->name = "DemoBridge"; $this->name = "DemoBridge";
$this->uri = "http://github.com/sebsauvage/rss-bridge"; $this->uri = "http://github.com/sebsauvage/rss-bridge";
$this->description = "Bridge used for demos"; $this->description = "Bridge used for demos";
$this->update = "2016-08-08"; $this->update = "2016-08-09";
$this->parameters['testCheckbox'] = $this->parameters['testCheckbox'] =
'[ '[
@ -54,7 +54,7 @@ class DemoBridge extends BridgeAbstract{
public function collectData(array $param){ public function collectData(array $param){
$item = new \Item(); $item = new \Item();
$item->name = "TestElement"; $item->author = "Me!";
$item->title = "Test"; $item->title = "Test";
$item->content = "Awesome content !"; $item->content = "Awesome content !";
$item->id = "Lalala"; $item->id = "Lalala";

View file

@ -6,7 +6,7 @@ class ElsevierBridge extends BridgeAbstract{
$this->name = 'Elsevier journals recent articles'; $this->name = 'Elsevier journals recent articles';
$this->uri = 'http://www.journals.elsevier.com'; $this->uri = 'http://www.journals.elsevier.com';
$this->description = 'Returns the recent articles published in Elsevier journals'; $this->description = 'Returns the recent articles published in Elsevier journals';
$this->update = '2016-08-06'; $this->update = '2016-08-09';
$this->parameters[] = $this->parameters[] =
'[ '[
@ -69,7 +69,7 @@ class ElsevierBridge extends BridgeAbstract{
$item = new \Item(); $item = new \Item();
$item->uri = $article->find('.pod-listing-header>a',0)->getAttribute('href').'?np=y'; $item->uri = $article->find('.pod-listing-header>a',0)->getAttribute('href').'?np=y';
$item->title = $article->find('.pod-listing-header>a',0)->plaintext; $item->title = $article->find('.pod-listing-header>a',0)->plaintext;
$item->name = $this->ExtractArticleName($article); $item->author = $this->ExtractArticleName($article);
$item->timestamp = $this->ExtractArticleTimestamp($article); $item->timestamp = $this->ExtractArticleTimestamp($article);
$item->content = $this->ExtractArticleContent($article); $item->content = $this->ExtractArticleContent($article);
$this->items[] = $item; $this->items[] = $item;

View file

@ -7,7 +7,7 @@ class FootitoBridge extends BridgeAbstract{
$this->name = "Footito"; $this->name = "Footito";
$this->uri = "http://www.footito.fr/"; $this->uri = "http://www.footito.fr/";
$this->description = "Footito"; $this->description = "Footito";
$this->update = "2016-08-06"; $this->update = "2016-08-09";
} }
@ -36,7 +36,7 @@ class FootitoBridge extends BridgeAbstract{
$info = $element->find('div.infos', 0); $info = $element->find('div.infos', 0);
$item->timestamp = strtotime($info->find('time', 0)->datetime); $item->timestamp = strtotime($info->find('time', 0)->datetime);
$item->name = $info->find('a.auteur', 0)->plaintext; $item->author = $info->find('a.auteur', 0)->plaintext;
$this->items[] = $item; $this->items[] = $item;
} }

View file

@ -8,7 +8,7 @@ class Freenews extends RssExpander {
$this->name = "Freenews"; $this->name = "Freenews";
$this->uri = "http://freenews.fr"; $this->uri = "http://freenews.fr";
$this->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."; $this->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.";
$this->update = "26/03/2014"; $this->update = "2016-08-09";
$this->parameters[] = $this->parameters[] =
'[ '[
@ -38,7 +38,7 @@ class Freenews extends RssExpander {
$content = $articlePage->find('.post-container', 0); $content = $articlePage->find('.post-container', 0);
$item->content = $content->innertext; $item->content = $content->innertext;
$item->name = $articlePage->find('a[rel=author]', 0)->innertext; $item->author = $articlePage->find('a[rel=author]', 0)->innertext;
// format should parse 2014-03-25T16:21:20Z. But, according to http://stackoverflow.com/a/10478469, it is not that simple // format should parse 2014-03-25T16:21:20Z. But, according to http://stackoverflow.com/a/10478469, it is not that simple
$item->timestamp = $this->RSS_2_0_time_to_timestamp($newsItem); $item->timestamp = $this->RSS_2_0_time_to_timestamp($newsItem);
return $item; return $item;

View file

@ -10,7 +10,7 @@ class Gawker extends RssExpander{
$this->name = "Gawker media"; $this->name = "Gawker media";
$this->uri = "http://feeds.gawker.com/"; $this->uri = "http://feeds.gawker.com/";
$this->description = "A bridge allowing access to any of the numerous Gawker media blogs (Lifehacker, deadspin, Kotaku, Jezebel, and so on. Notice you have to give its id to find the RSS stream in gawker maze"; $this->description = "A bridge allowing access to any of the numerous Gawker media blogs (Lifehacker, deadspin, Kotaku, Jezebel, and so on. Notice you have to give its id to find the RSS stream in gawker maze";
$this->update = "27/03/2014"; $this->update = "2016-08-09";
$this->parameters[] = $this->parameters[] =
'[ '[
@ -53,7 +53,7 @@ class Gawker extends RssExpander{
$vcard = $articlePage->find('.vcard', 0); $vcard = $articlePage->find('.vcard', 0);
if(is_object($vcard)) { if(is_object($vcard)) {
$authorLink = $vcard->find('a', 0); $authorLink = $vcard->find('a', 0);
$item->name = $authorLink->innertext; $item->author = $authorLink->innertext;
// TODO use author link href to fill the feed info // TODO use author link href to fill the feed info
} }
// $this->message("item quite loaded : ".var_export($item, true)); // $this->message("item quite loaded : ".var_export($item, true));

View file

@ -12,7 +12,7 @@ class GithubIssueBridge extends BridgeAbstract{
$this->name = 'Github Issue'; $this->name = 'Github Issue';
$this->uri = ''; $this->uri = '';
$this->description = 'Returns the comments of a github project issue'; $this->description = 'Returns the comments of a github project issue';
$this->update = '2016-06-25'; $this->update = '2016-08-09';
$this->parameters[]= $this->parameters[]=
'[ '[
@ -40,7 +40,7 @@ class GithubIssueBridge extends BridgeAbstract{
foreach($html->find('.js-comment-container') as $comment){ foreach($html->find('.js-comment-container') as $comment){
$item = new \Item(); $item = new \Item();
$item->name=$comment->find('img',0)->getAttribute('alt'); $item->author=$comment->find('img',0)->getAttribute('alt');
$comment=$comment->firstChild()->nextSibling(); $comment=$comment->firstChild()->nextSibling();

View file

@ -12,7 +12,7 @@ class GitlabCommitsBridge extends BridgeAbstract{
$this->name = 'Gitlab Commits'; $this->name = 'Gitlab Commits';
$this->uri = ''; $this->uri = '';
$this->description = 'Returns the commits of a project hosted on a gitlab instance'; $this->description = 'Returns the commits of a project hosted on a gitlab instance';
$this->update = '2016-08-06'; $this->update = '2016-08-09';
$this->parameters[] = $this->parameters[] =
'[ '[
@ -64,7 +64,7 @@ class GitlabCommitsBridge extends BridgeAbstract{
$item->title=$a->plaintext; $item->title=$a->plaintext;
} }
if(in_array('commit-author-link',$classes)){ if(in_array('commit-author-link',$classes)){
$item->name=trim($a->plaintext); $item->author=trim($a->plaintext);
} }
} }

View file

@ -12,7 +12,7 @@ class LWNprevBridge extends BridgeAbstract{
$this->name = 'LWN Free Weekly Edition'; $this->name = 'LWN Free Weekly Edition';
$this->uri = 'https://lwn.net/free/bigpage'; $this->uri = 'https://lwn.net/free/bigpage';
$this->description = 'LWN Free Weekly Edition available one week late'; $this->description = 'LWN Free Weekly Edition available one week late';
$this->update = '2016-19-01'; $this->update = '2016-08-09';
} }
@ -88,14 +88,14 @@ class LWNprevBridge extends BridgeAbstract{
switch($h2NextSibling->getAttribute('class')){ switch($h2NextSibling->getAttribute('class')){
case 'FeatureByline': case 'FeatureByline':
$item->name=$h2NextSibling->getElementsByTagName('b')->item(0)->textContent; $item->author=$h2NextSibling->getElementsByTagName('b')->item(0)->textContent;
break; break;
case 'GAByline': case 'GAByline':
$text=$h2NextSibling->textContent; $text=$h2NextSibling->textContent;
$item->name=substr($text,strpos($text,'by ')); $item->author=substr($text,strpos($text,'by '));
break; break;
default: default:
$item->name='LWN'; $item->author='LWN';
break; break;
}; };

View file

@ -10,7 +10,7 @@ class Les400Culs extends RssExpander{
$this->name = "Les 400 Culs"; $this->name = "Les 400 Culs";
$this->uri = "http://sexes.blogs.liberation.fr"; $this->uri = "http://sexes.blogs.liberation.fr";
$this->description = "La planete sexe vue par Agnes Girard via rss-bridge"; $this->description = "La planete sexe vue par Agnes Girard via rss-bridge";
$this->update = "20/02/2014"; $this->update = "2016-08-09";
} }
@ -34,7 +34,7 @@ class Les400Culs extends RssExpander{
// $content = $articlePage->find('.post-container', 0); // $content = $articlePage->find('.post-container', 0);
$item->content = (string) $newsItem->description; $item->content = (string) $newsItem->description;
$item->name = (string) $newsItem->author; $item->author = (string) $newsItem->author;
$item->timestamp = $this->RSS_2_0_time_to_timestamp($newsItem); $item->timestamp = $this->RSS_2_0_time_to_timestamp($newsItem);
return $item; return $item;
} }

View file

@ -7,7 +7,7 @@ class LesJoiesDuCodeBridge extends BridgeAbstract{
$this->name = "Les Joies Du Code"; $this->name = "Les Joies Du Code";
$this->uri = "http://lesjoiesducode.fr/"; $this->uri = "http://lesjoiesducode.fr/";
$this->description = "LesJoiesDuCode"; $this->description = "LesJoiesDuCode";
$this->update = "2016-08-06"; $this->update = "2016-08-09";
} }
@ -36,7 +36,7 @@ class LesJoiesDuCodeBridge extends BridgeAbstract{
if($pos > 0) if($pos > 0)
{ {
$auteur = trim(str_replace("*/", "", substr($auteur->innertext, ($pos + 2)))); $auteur = trim(str_replace("*/", "", substr($auteur->innertext, ($pos + 2))));
$item->name = $auteur; $item->author = $auteur;
} }

View file

@ -8,7 +8,7 @@ class SensCritiqueBridge extends BridgeAbstract {
$this->name = "Sens Critique"; $this->name = "Sens Critique";
$this->uri = "http://www.senscritique.com"; $this->uri = "http://www.senscritique.com";
$this->description = "Sens Critique news"; $this->description = "Sens Critique news";
$this->update = "2016-08-06"; $this->update = "2016-08-09";
$this->parameters[] = $this->parameters[] =
'[ '[
@ -118,7 +118,7 @@ class SensCritiqueBridge extends BridgeAbstract {
foreach ($list->find('li') as $movie) { foreach ($list->find('li') as $movie) {
$item = new \Item(); $item = new \Item();
$item->name = htmlspecialchars_decode($movie->find('.elco-title a', 0)->plaintext, ENT_QUOTES) . ' ' . $movie->find('.elco-date', 0)->plaintext; $item->author = htmlspecialchars_decode($movie->find('.elco-title a', 0)->plaintext, ENT_QUOTES) . ' ' . $movie->find('.elco-date', 0)->plaintext;
$item->title = $movie->find('.elco-title a', 0)->plaintext . ' ' . $movie->find('.elco-date', 0)->plaintext; $item->title = $movie->find('.elco-title a', 0)->plaintext . ' ' . $movie->find('.elco-date', 0)->plaintext;
$item->content = '<em>' . $movie->find('.elco-original-title', 0)->plaintext . '</em><br><br>' . $item->content = '<em>' . $movie->find('.elco-original-title', 0)->plaintext . '</em><br><br>' .
$movie->find('.elco-baseline', 0)->plaintext . '<br>' . $movie->find('.elco-baseline', 0)->plaintext . '<br>' .

View file

@ -8,7 +8,7 @@ class Sexactu extends BridgeAbstract{
$this->name = "Sexactu"; $this->name = "Sexactu";
$this->uri = "http://www.gqmagazine.fr"; $this->uri = "http://www.gqmagazine.fr";
$this->description = "Sexactu via rss-bridge"; $this->description = "Sexactu via rss-bridge";
$this->update = "2016-08-06"; $this->update = "2016-08-09";
} }
@ -42,7 +42,7 @@ $replace = array('January', 'February', 'March', 'April', 'May', 'June', 'July',
$date = strtotime($dateText); $date = strtotime($dateText);
$item->timestamp = $date; $item->timestamp = $date;
$item->name = "Maïa Mazaurette"; $item->author = "Maïa Mazaurette";
$elementText = $element->find('.text-container', 0); $elementText = $element->find('.text-container', 0);
// don't forget to replace images server url with gq one // don't forget to replace images server url with gq one
foreach($elementText->find('img') as $image) { foreach($elementText->find('img') as $image) {

View file

@ -10,7 +10,7 @@ class SoundCloudBridge extends BridgeAbstract{
$this->name = "Soundcloud Bridge"; $this->name = "Soundcloud Bridge";
$this->uri = "http://www.soundcloud.com/"; $this->uri = "http://www.soundcloud.com/";
$this->description = "Returns 10 newest music from user profile"; $this->description = "Returns 10 newest music from user profile";
$this->update = "2016-08-06"; $this->update = "2016-08-09";
$this->parameters[] = $this->parameters[] =
'[ '[
@ -40,7 +40,7 @@ class SoundCloudBridge extends BridgeAbstract{
for ($i=0; $i < 10; $i++) { for ($i=0; $i < 10; $i++) {
$item = new \Item(); $item = new \Item();
$item->name = $tracks[$i]->user->username .' - '. $tracks[$i]->title; $item->author = $tracks[$i]->user->username .' - '. $tracks[$i]->title;
$item->title = $tracks[$i]->user->username .' - '. $tracks[$i]->title; $item->title = $tracks[$i]->user->username .' - '. $tracks[$i]->title;
$item->content = '<audio src="'. $tracks[$i]->uri .'/stream?client_id='. self::CLIENT_ID .'">'; $item->content = '<audio src="'. $tracks[$i]->uri .'/stream?client_id='. self::CLIENT_ID .'">';
$item->id = 'https://soundcloud.com/'. urlencode($this->request) .'/'. urlencode($tracks[$i]->permalink); $item->id = 'https://soundcloud.com/'. urlencode($this->request) .'/'. urlencode($tracks[$i]->permalink);

View file

@ -12,7 +12,7 @@ class StripeAPIChangeLogBridge extends BridgeAbstract{
$this->name = 'Stripe API Changelog'; $this->name = 'Stripe API Changelog';
$this->uri = ''; $this->uri = '';
$this->description = 'Returns the changes made to the stripe.com API'; $this->description = 'Returns the changes made to the stripe.com API';
$this->update = '2016-06-20'; $this->update = '2016-08-09';
} }
public function collectData(array $param){ public function collectData(array $param){
@ -24,7 +24,7 @@ class StripeAPIChangeLogBridge extends BridgeAbstract{
$item=new \Item(); $item=new \Item();
$item->title=trim($change->plaintext); $item->title=trim($change->plaintext);
$item->uri='https://stripe.com/docs/upgrades#'.$item->title; $item->uri='https://stripe.com/docs/upgrades#'.$item->title;
$item->name='stripe'; $item->author='stripe';
$item->content=$change->nextSibling()->outertext; $item->content=$change->nextSibling()->outertext;
$item->timestamp=strtotime($item->title); $item->timestamp=strtotime($item->title);
$this->items[]=$item; $this->items[]=$item;

View file

@ -7,7 +7,7 @@ class TheCodingLoveBridge extends BridgeAbstract{
$this->name = "The Coding Love"; $this->name = "The Coding Love";
$this->uri = "http://thecodinglove.com/"; $this->uri = "http://thecodinglove.com/";
$this->description = "The Coding Love"; $this->description = "The Coding Love";
$this->update = "2016-08-06"; $this->update = "2016-08-09";
} }
@ -37,7 +37,7 @@ class TheCodingLoveBridge extends BridgeAbstract{
if($pos > 0) if($pos > 0)
{ {
$auteur = trim(str_replace("*/", "", substr($auteur->innertext, ($pos + 2)))); $auteur = trim(str_replace("*/", "", substr($auteur->innertext, ($pos + 2))));
$item->name = $auteur; $item->author = $auteur;
} }

View file

@ -10,7 +10,7 @@ class TheOatmealBridge extends RssExpander{
$this->name = "The Oatmeal"; $this->name = "The Oatmeal";
$this->uri = "http://theoatmeal.com/"; $this->uri = "http://theoatmeal.com/";
$this->description = "Un petit site de dessins assez rigolos"; $this->description = "Un petit site de dessins assez rigolos";
$this->update = "2015-07-03"; $this->update = "2016-08-09";
} }
@ -53,9 +53,9 @@ class TheOatmealBridge extends RssExpander{
$item->content = $content->innertext; $item->content = $content->innertext;
$this->message("dc content is ".var_export($dc, true)); $this->message("dc content is ".var_export($dc, true));
$item->name = (string) $dc->creator; $item->author = (string) $dc->creator;
$item->timestamp = DateTime::createFromFormat(DateTime::ISO8601, $dc->date)->getTimestamp(); $item->timestamp = DateTime::createFromFormat(DateTime::ISO8601, $dc->date)->getTimestamp();
$this->message("writtem by ".$item->name." on ".$item->timestamp); $this->message("writtem by ".$item->author." on ".$item->timestamp);
return $item; return $item;
} }

View file

@ -10,7 +10,7 @@ class WhydBridge extends BridgeAbstract{
$this->name = "Whyd Bridge"; $this->name = "Whyd Bridge";
$this->uri = "http://www.whyd.com/"; $this->uri = "http://www.whyd.com/";
$this->description = "Returns 10 newest music from user profile"; $this->description = "Returns 10 newest music from user profile";
$this->update = "2016-08-06"; $this->update = "2016-08-09";
$this->parameters[] = $this->parameters[] =
'[ '[
@ -48,7 +48,7 @@ class WhydBridge extends BridgeAbstract{
for($i = 0; $i < 10; $i++) { for($i = 0; $i < 10; $i++) {
$track = $html->find('div.post', $i); $track = $html->find('div.post', $i);
$item = new \Item(); $item = new \Item();
$item->name = $track->find('h2', 0)->plaintext; $item->author = $track->find('h2', 0)->plaintext;
$item->title = $track->find('h2', 0)->plaintext; $item->title = $track->find('h2', 0)->plaintext;
$item->content = $track->find('a.thumb',0) . '<br/>' . $track->find('h2', 0)->plaintext; $item->content = $track->find('a.thumb',0) . '<br/>' . $track->find('h2', 0)->plaintext;
$item->id = 'http://www.whyd.com' . $track->find('a.no-ajaxy',0)->getAttribute('href'); $item->id = 'http://www.whyd.com' . $track->find('a.no-ajaxy',0)->getAttribute('href');

View file

@ -12,7 +12,7 @@ class WorldOfTanks extends HttpCachingBridgeAbstract{
$this->name = "World of Tanks"; $this->name = "World of Tanks";
$this->uri = "http://worldoftanks.eu/"; $this->uri = "http://worldoftanks.eu/";
$this->description = "News about the tank slaughter game."; $this->description = "News about the tank slaughter game.";
$this->update = "2016-08-06"; $this->update = "2016-08-09";
$this->parameters[] = $this->parameters[] =
'[ '[
@ -89,7 +89,6 @@ class WorldOfTanks extends HttpCachingBridgeAbstract{
HTMLSanitizer::defaultImageSrcTo($content, WORLD_OF_TANKS); HTMLSanitizer::defaultImageSrcTo($content, WORLD_OF_TANKS);
$item->title = $content->find('h1', 0)->innertext; $item->title = $content->find('h1', 0)->innertext;
$item->content = $content->find('.b-content', 0)->innertext; $item->content = $content->find('.b-content', 0)->innertext;
// $item->name = $auteur->innertext;
$item->timestamp = $content->find('.b-statistic_time', 0)->getAttribute("data-timestamp"); $item->timestamp = $content->find('.b-statistic_time', 0)->getAttribute("data-timestamp");
$this->items[] = $item; $this->items[] = $item;
} }