[ViadeoCompanyBridge] add Bridge suffix to class name + code simplification

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
Pierre Mazière 2016-08-29 23:42:26 +02:00
parent 0262162bc3
commit 55c406e1b4

View file

@ -1,5 +1,5 @@
<?php
class ViadeoCompany extends BridgeAbstract{
class ViadeoCompanyBridge extends BridgeAbstract{
public $maintainer = "regisenguehard";
public $name = "Viadeo Company";
@ -15,9 +15,10 @@ class ViadeoCompany extends BridgeAbstract{
public function collectData(){
$html = '';
$link = 'http://www.viadeo.com/fr/company/'.$this->getInput('c');
$link = $this->uri.'fr/company/'.$this->getInput('c');
$html = $this->getSimpleHTMLDOM($link) or $this->returnServerError('Could not request Viadeo.');
$html = $this->getSimpleHTMLDOM($link)
or $this->returnServerError('Could not request Viadeo.');
foreach($html->find('//*[@id="company-newsfeed"]/ul/li') as $element) {
$title = $element->find('p', 0)->innertext;