Skip to content

Commit

Permalink
[GBAtemp] Fix title extraction (#4151)
Browse files Browse the repository at this point in the history
Fix title extraction for news and reviews
  • Loading branch information
ORelio authored Jul 28, 2024
1 parent da8cfdf commit f7ddbcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bridges/GBAtempBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function collectData()
$img = $this->findItemImage($newsItem, 'a.news_image');
$time = $this->findItemDate($newsItem);
$author = $newsItem->find('a.username', 0)->plaintext;
$title = $this->decodeHtmlEntities($newsItem->find('h3.news_title', 0)->plaintext);
$title = $this->decodeHtmlEntities($newsItem->find('h2.news_title', 0)->plaintext);
$content = $this->fetchPostContent($url, self::URI);
$this->items[] = $this->buildItem($url, $title, $author, $time, $img, $content);
unset($newsItem); // Some items are heavy, freeing the item proactively helps saving memory
Expand All @@ -41,7 +41,7 @@ public function collectData()
foreach ($html->find('li.portal_review') as $reviewItem) {
$url = urljoin(self::URI, $reviewItem->find('a.review_boxart', 0)->href);
$img = $this->findItemImage($reviewItem, 'a.review_boxart');
$title = $this->decodeHtmlEntities($reviewItem->find('h2.review_title', 0)->plaintext);
$title = $this->decodeHtmlEntities($reviewItem->find('div.review_title', 0)->find('h2', 0)->plaintext);
$content = getSimpleHTMLDOMCached($url);
$author = $content->find('span.author--name', 0)->plaintext;
$time = $this->findItemDate($content);
Expand Down

0 comments on commit f7ddbcd

Please sign in to comment.