mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-02-16 23:29:56 +03:00
[ScmbBridge] Remove "read more" text only if it exists (#2368)
This commit is contained in:
parent
28db707587
commit
814711e3af
1 changed files with 4 additions and 1 deletions
|
@ -18,7 +18,10 @@ class ScmbBridge extends BridgeAbstract {
|
||||||
$item['title'] = $article->find('header h1 a', 0)->innertext;
|
$item['title'] = $article->find('header h1 a', 0)->innertext;
|
||||||
|
|
||||||
// remove text "En savoir plus" from anecdote content
|
// remove text "En savoir plus" from anecdote content
|
||||||
$article->find('span.read-more', 0)->outertext = '';
|
$readMoreButton = $article->find('span.read-more', 0);
|
||||||
|
if ($readMoreButton) {
|
||||||
|
$readMoreButton->outertext = '';
|
||||||
|
}
|
||||||
$content = $article->find('p.summary a', 0)->innertext;
|
$content = $article->find('p.summary a', 0)->innertext;
|
||||||
|
|
||||||
// remove superfluous spaces at the end
|
// remove superfluous spaces at the end
|
||||||
|
|
Loading…
Add table
Reference in a new issue