mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-03-14 20:21:14 +03:00
* [Wordpress] fix: add css selector for article, #2173 * fix: resolve relative links in item content
This commit is contained in:
parent
8e423277e0
commit
90db8c4969
1 changed files with 6 additions and 0 deletions
|
@ -26,6 +26,11 @@ class WordPressBridge extends FeedExpander {
|
|||
|
||||
$article = null;
|
||||
switch(true) {
|
||||
|
||||
// Custom fix for theme in https://jungefreiheit.de/politik/deutschland/2022/wahl-im-saarland/
|
||||
case !is_null($article_html->find('div[data-widget_type="theme-post-content.default"]', 0)):
|
||||
$article = $article_html->find('div[data-widget_type="theme-post-content.default"]', 0);
|
||||
break;
|
||||
case !is_null($article_html->find('[itemprop=articleBody]', 0)):
|
||||
// highest priority content div
|
||||
$article = $article_html->find('[itemprop=articleBody]', 0);
|
||||
|
@ -73,6 +78,7 @@ class WordPressBridge extends FeedExpander {
|
|||
|
||||
if(!is_null($article)) {
|
||||
$item['content'] = $this->cleanContent($article->innertext);
|
||||
$item['content'] = defaultLinkTo($item['content'], $item['uri']);
|
||||
}
|
||||
|
||||
return $item;
|
||||
|
|
Loading…
Add table
Reference in a new issue