Merge pull request #267 from Frenzie/master
Use "Lire la suite" link for extracting link and title
This commit is contained in:
commit
973f0ba8d8
1 changed files with 5 additions and 5 deletions
|
@ -7,7 +7,7 @@ class WikipediaFRBridge extends BridgeAbstract{
|
||||||
$this->name = "Wikipedia FR 'Lumière sur...'";
|
$this->name = "Wikipedia FR 'Lumière sur...'";
|
||||||
$this->uri = "https://fr.wikipedia.org/";
|
$this->uri = "https://fr.wikipedia.org/";
|
||||||
$this->description = "Returns the highlighted fr.wikipedia.org article.";
|
$this->description = "Returns the highlighted fr.wikipedia.org article.";
|
||||||
$this->update = "2014-05-25";
|
$this->update = "2016-06-04";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,11 +20,11 @@ class WikipediaFRBridge extends BridgeAbstract{
|
||||||
|
|
||||||
$html = file_get_html($host.$link) or $this->returnError('Could not request Wikipedia FR.', 404);
|
$html = file_get_html($host.$link) or $this->returnError('Could not request Wikipedia FR.', 404);
|
||||||
|
|
||||||
$element = $html->find('div[id=accueil-lumieresur]', 0);
|
$element = $html->find('div[id=mf-lumieresur]', 0);
|
||||||
$item = new \Item();
|
$item = new \Item();
|
||||||
$item->uri = $host.$element->find('p', 0)->find('a', 0)->href;
|
$item->uri = $host.$element->find('.BA > i > a', 0)->href;
|
||||||
$item->title = $element->find('p',0)->find('a',0)->title;
|
$item->title = $element->find('.BA > i > a',0)->title;
|
||||||
$item->content = str_replace('href="/', 'href="'.$host.'/', $element->find('div[id=mf-lumieresur]', 0)->innertext);
|
$item->content = str_replace('href="/', 'href="'.$host.'/', $element->innertext);
|
||||||
$this->items[] = $item;
|
$this->items[] = $item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue