[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:
Dag 2022-03-25 03:06:00 +01:00
parent b57d19b29c
commit 6e0589f9a0

View File

@ -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);