[CourrierInternationalBridge] fix uri value and code simplification

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière 2016-08-28 13:14:56 +02:00
parent 6f8a773260
commit 963bbcc402

View file

@ -3,16 +3,13 @@ class CourrierInternationalBridge extends BridgeAbstract{
public $maintainer = "teromene";
public $name = "Courrier International Bridge";
public $uri = "http://CourrierInternational.fr/";
public $uri = "http://CourrierInternational.com/";
public $description = "Courrier International bridge";
public function collectData(){
$html = '';
$html = $this->getSimpleHTMLDOM('http://www.courrierinternational.com/') or $this->returnServerError('Error.');
$html = $this->getSimpleHTMLDOM($this->uri)
or $this->returnServerError('Error.');
$element = $html->find("article");
@ -25,7 +22,7 @@ class CourrierInternationalBridge extends BridgeAbstract{
$item['uri'] = $article->parent->getAttribute("href");
if(strpos($item['uri'], "http") === FALSE) {
$item['uri'] = "http://courrierinternational.fr/".$item['uri'];
$item['uri'] = $this->uri.$item['uri'];
}
$page = $this->getSimpleHTMLDOM($item['uri']);