mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-01-17 14:18:35 +01:00
[AcrimedBridge] reapply code simplification
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
parent
3daeacc208
commit
a0dfbe6efd
@ -7,7 +7,7 @@ class AcrimedBridge extends FeedExpander {
|
||||
const DESCRIPTION = "Returns the newest articles.";
|
||||
|
||||
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){
|
||||
@ -16,7 +16,7 @@ class AcrimedBridge extends FeedExpander {
|
||||
$hs = new HTMLSanitizer();
|
||||
$articlePage = $this->getSimpleHTMLDOM($newsItem->link);
|
||||
$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;
|
||||
|
||||
return $item;
|
||||
|
Loading…
x
Reference in New Issue
Block a user