From bf1773ed8b7f73baa7d9cc2075bb2725dff73315 Mon Sep 17 00:00:00 2001 From: ORelio Date: Tue, 10 Aug 2021 19:49:10 +0200 Subject: [PATCH] [GBAtemp] Fix news extraction (#2241) --- bridges/GBAtempBridge.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bridges/GBAtempBridge.php b/bridges/GBAtempBridge.php index e0841950..2faa8458 100644 --- a/bridges/GBAtempBridge.php +++ b/bridges/GBAtempBridge.php @@ -81,9 +81,9 @@ class GBAtempBridge extends BridgeAbstract { switch($this->getInput('type')) { case 'N': - foreach($html->find('li[class=news_item full]') as $newsItem) { + foreach($html->find('li[class=news_item news full]') as $newsItem) { $url = self::URI . $newsItem->find('a', 0)->href; - $img = $this->getURI() . $newsItem->find('img', 0)->src . '#.image'; + $img = $this->getURI() . extractFromDelimiters($newsItem->find('a.news_image', 0)->style, 'url(', ')') . '#.image'; $time = $this->findItemDate($newsItem); $author = $newsItem->find('a.username', 0)->plaintext; $title = $newsItem->find('a', 1)->plaintext;