forked from blallo/rss-bridge
[ScmBridge] code simplification
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
parent
92e0bec925
commit
b1d9d88772
1 changed files with 3 additions and 2 deletions
|
@ -8,11 +8,12 @@ class ScmbBridge extends BridgeAbstract{
|
|||
|
||||
public function collectData(){
|
||||
$html = '';
|
||||
$html = $this->getSimpleHTMLDOM('http://secouchermoinsbete.fr/') or $this->returnServerError('Could not request Se Coucher Moins Bete.');
|
||||
$html = $this->getSimpleHTMLDOM($this->uri)
|
||||
or $this->returnServerError('Could not request Se Coucher Moins Bete.');
|
||||
|
||||
foreach($html->find('article') as $article) {
|
||||
$item = array();
|
||||
$item['uri'] = 'http://secouchermoinsbete.fr'.$article->find('p.summary a',0)->href;
|
||||
$item['uri'] = $this->uri.$article->find('p.summary a',0)->href;
|
||||
$item['title'] = $article->find('header h1 a',0)->innertext;
|
||||
|
||||
$article->find('span.read-more',0)->outertext=''; // remove text "En savoir plus" from anecdote content
|
||||
|
|
Loading…
Reference in a new issue