mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-09 16:38:50 +00:00
[EconomistBridge] fix: broken bridge
Fixes: Call to a member function find() on boo The new-style articles had their DOM changed.
This commit is contained in:
parent
b57d19b29c
commit
6e0589f9a0
@ -102,10 +102,12 @@ class EconomistBridge extends FeedExpander {
|
|||||||
$contentNode = 'div.layout-article-body';
|
$contentNode = 'div.layout-article-body';
|
||||||
$imgNode = 'div.article__lead-image';
|
$imgNode = 'div.article__lead-image';
|
||||||
$categoryNode = 'span.article__subheadline';
|
$categoryNode = 'span.article__subheadline';
|
||||||
} else {
|
} elseif ($article->find('article', 0)->getAttribute('data-test-id') === 'NewArticle') {
|
||||||
$contentNode = 'div.e4sqmp1';
|
$contentNode = 'section';
|
||||||
$imgNode = 'figure.e3y6nua0';
|
$imgNode = 'figure.css-12eysrk.e3y6nua0';
|
||||||
$categoryNode = 'span.ern1uyf0';
|
$categoryNode = 'span.ern1uyf0';
|
||||||
|
} else {
|
||||||
|
// pass
|
||||||
}
|
}
|
||||||
|
|
||||||
$item['content'] = $this->cleanContent($article, $contentNode);
|
$item['content'] = $this->cleanContent($article, $contentNode);
|
||||||
|
Loading…
Reference in New Issue
Block a user