1
0
Fork 0
forked from blallo/rss-bridge

[LinkedInCompanyBridge] 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 13:01:44 +02:00
parent 98ebed9bc0
commit c53210b434

View file

@ -1,5 +1,5 @@
<?php
class LinkedInCompany extends BridgeAbstract{
class LinkedInCompanyBridge extends BridgeAbstract{
public $maintainer = "regisenguehard";
public $name = "LinkedIn Company";
@ -15,9 +15,10 @@ class LinkedInCompany extends BridgeAbstract{
public function collectData(){
$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) {
$title = $element->find('span.share-body', 0)->innertext;