[AcrimedBridge] reapply code simplification
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
parent
3daeacc208
commit
a0dfbe6efd
1 changed files with 2 additions and 2 deletions
|
@ -7,7 +7,7 @@ class AcrimedBridge extends FeedExpander {
|
||||||
const DESCRIPTION = "Returns the newest articles.";
|
const DESCRIPTION = "Returns the newest articles.";
|
||||||
|
|
||||||
public function collectData(){
|
public function collectData(){
|
||||||
$this->collectExpandableDatas("http://www.acrimed.org/spip.php?page=backend");
|
$this->collectExpandableDatas(static::URI.'spip.php?page=backend');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function parseItem($newsItem){
|
protected function parseItem($newsItem){
|
||||||
|
@ -16,7 +16,7 @@ class AcrimedBridge extends FeedExpander {
|
||||||
$hs = new HTMLSanitizer();
|
$hs = new HTMLSanitizer();
|
||||||
$articlePage = $this->getSimpleHTMLDOM($newsItem->link);
|
$articlePage = $this->getSimpleHTMLDOM($newsItem->link);
|
||||||
$article = $hs->sanitize($articlePage->find('article.article1', 0)->innertext);
|
$article = $hs->sanitize($articlePage->find('article.article1', 0)->innertext);
|
||||||
$article = HTMLSanitizer::defaultImageSrcTo($article, "http://www.acrimed.org/");
|
$article = HTMLSanitizer::defaultImageSrcTo($article, static::URI);
|
||||||
$item['content'] = $article;
|
$item['content'] = $article;
|
||||||
|
|
||||||
return $item;
|
return $item;
|
||||||
|
|
Loading…
Reference in a new issue