Merge branch 'fixIndividualBridges' of https://framagit.org/peetah/rss-bridge

This commit is contained in:
logmanoriginal 2016-09-04 13:22:35 +02:00
commit e30ce8aea0
3 changed files with 13 additions and 13 deletions

View file

@ -8,7 +8,7 @@ class ABCTabsBridge extends BridgeAbstract{
public function collectData(){
$html = '';
$html = $this->getSimpleHTMLDOM('http://www.abc-tabs.com/tablatures/nouveautes.html') or $this->returnClientError('No results for this query.');
$html = $this->getSimpleHTMLDOM(static::URI.'tablatures/nouveautes.html') or $this->returnClientError('No results for this query.');
$table = $html->find('table#myTable', 0)->children(1);
foreach ($table->find('tr') as $tab)
@ -17,8 +17,8 @@ class ABCTabsBridge extends BridgeAbstract{
$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['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['uri'] = 'http://www.abc-tabs.com' . $tab->find('td', 2)->find('a', 0)->getAttribute('href');
$item['id'] = static::URI . $tab->find('td', 2)->find('a', 0)->getAttribute('href');
$item['uri'] = static::URI . $tab->find('td', 2)->find('a', 0)->getAttribute('href');
$this->items[] = $item;
}
}

View file

@ -9,7 +9,7 @@ class AcrimedBridge extends RssExpander{
public function collectData(){
$this->collectExpandableDatas("http://www.acrimed.org/spip.php?page=backend");
$this->collectExpandableDatas(static::URI.'spip.php?page=backend');
}
@ -27,7 +27,7 @@ class AcrimedBridge extends RssExpander{
$articlePage = $this->getSimpleHTMLDOM($newsItem->link);
$article = $hs->sanitize($articlePage->find('article.article1', 0)->innertext);
$article = HTMLSanitizer::defaultImageSrcTo($article, "http://www.acrimed.org/");
$article = HTMLSanitizer::defaultImageSrcTo($article, static::URI);
$item['content'] = $article;

View file

@ -24,13 +24,13 @@ class AllocineFRBridge extends BridgeAbstract{
public function getURI(){
switch($this->getInput('category')){
case 'faux-raccord':
$uri = 'http://www.allocine.fr/video/programme-12284/saison-24580/';
$uri = static::URI.'video/programme-12284/saison-24580/';
break;
case 'top-5':
$uri = 'http://www.allocine.fr/video/programme-12299/saison-22542/';
$uri = static::URI.'video/programme-12299/saison-22542/';
break;
case 'tueurs-en-serie':
$uri = 'http://www.allocine.fr/video/programme-12286/saison-22938/';
$uri = static::URI.'video/programme-12286/saison-22938/';
break;
}
@ -66,13 +66,13 @@ class AllocineFRBridge extends BridgeAbstract{
if($figCaption !== false)
{
$content = str_replace('src="/', 'src="http://www.allocine.fr/', $content);
$content = str_replace('href="/', 'href="http://www.allocine.fr/', $content);
$content = str_replace('src=\'/', 'src=\'http://www.allocine.fr/', $content);
$content = str_replace('href=\'/', 'href=\'http://www.allocine.fr/', $content);
$content = str_replace('src="/', 'src="'.static::URI, $content);
$content = str_replace('href="/', 'href="'.static::URI, $content);
$content = str_replace('src=\'/', 'src=\''.static::URI, $content);
$content = str_replace('href=\'/', 'href=\''.static::URI, $content);
$item['content'] = $content;
$item['title'] = trim($title->innertext);
$item['uri'] = "http://www.allocine.fr" . $title->href;
$item['uri'] = static::URI . $title->href;
$this->items[] = $item;
}
}