1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-20 07:11:43 +02:00

fix(arstechnica): plus a few unrelated tweaks (#3829)

This commit is contained in:
Dag
2023-12-13 21:40:13 +01:00
committed by GitHub
parent 0b67544f86
commit f01729c86f
6 changed files with 18 additions and 17 deletions

View File

@@ -37,7 +37,14 @@ class ArsTechnicaBridge extends FeedExpander
{
$item_html = getSimpleHTMLDOMCached($item['uri'] . '&amp');
$item_html = defaultLinkTo($item_html, self::URI);
$item['content'] = $item_html->find('.amp-wp-article-content', 0);
$item_content = $item_html->find('.article-content.post-page', 0);
if (!$item_content) {
// The dom selector probably broke. Let's just return the item as-is
return $item;
}
$item['content'] = $item_content;
// remove various ars advertising
$item['content']->find('#social-left', 0)->remove();