[LinkedInCompanyBridge] add Bridge suffix to class name + code simplification
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
parent
98ebed9bc0
commit
c53210b434
1 changed files with 4 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
class LinkedInCompany extends BridgeAbstract{
|
class LinkedInCompanyBridge extends BridgeAbstract{
|
||||||
|
|
||||||
public $maintainer = "regisenguehard";
|
public $maintainer = "regisenguehard";
|
||||||
public $name = "LinkedIn Company";
|
public $name = "LinkedIn Company";
|
||||||
|
@ -15,9 +15,10 @@ class LinkedInCompany extends BridgeAbstract{
|
||||||
|
|
||||||
public function collectData(){
|
public function collectData(){
|
||||||
$html = '';
|
$html = '';
|
||||||
$link = 'https://www.linkedin.com/company/'.$this->getInput('c');
|
$link = $this->uri.'company/'.$this->getInput('c');
|
||||||
|
|
||||||
$html = $this->getSimpleHTMLDOM($link) or $this->returnServerError('Could not request LinkedIn.');
|
$html = $this->getSimpleHTMLDOM($link)
|
||||||
|
or $this->returnServerError('Could not request LinkedIn.');
|
||||||
|
|
||||||
foreach($html->find('//*[@id="my-feed-post"]/li') as $element) {
|
foreach($html->find('//*[@id="my-feed-post"]/li') as $element) {
|
||||||
$title = $element->find('span.share-body', 0)->innertext;
|
$title = $element->find('span.share-body', 0)->innertext;
|
Loading…
Reference in a new issue