mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-23 01:55:27 +03:00
[ViadeoCompanyBridge] add Bridge suffix to class name + code simplification
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
parent
0262162bc3
commit
55c406e1b4
1 changed files with 4 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
class ViadeoCompany extends BridgeAbstract{
|
class ViadeoCompanyBridge extends BridgeAbstract{
|
||||||
|
|
||||||
public $maintainer = "regisenguehard";
|
public $maintainer = "regisenguehard";
|
||||||
public $name = "Viadeo Company";
|
public $name = "Viadeo Company";
|
||||||
|
@ -15,9 +15,10 @@ class ViadeoCompany extends BridgeAbstract{
|
||||||
|
|
||||||
public function collectData(){
|
public function collectData(){
|
||||||
$html = '';
|
$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) {
|
foreach($html->find('//*[@id="company-newsfeed"]/ul/li') as $element) {
|
||||||
$title = $element->find('p', 0)->innertext;
|
$title = $element->find('p', 0)->innertext;
|
Loading…
Reference in a new issue