mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-03-02 06:05:51 +03:00
[GBAtemp] Fix title extraction (#4151)
Fix title extraction for news and reviews
This commit is contained in:
parent
da8cfdf179
commit
f7ddbcd733
1 changed files with 2 additions and 2 deletions
|
@ -31,7 +31,7 @@ class GBAtempBridge extends BridgeAbstract
|
||||||
$img = $this->findItemImage($newsItem, 'a.news_image');
|
$img = $this->findItemImage($newsItem, 'a.news_image');
|
||||||
$time = $this->findItemDate($newsItem);
|
$time = $this->findItemDate($newsItem);
|
||||||
$author = $newsItem->find('a.username', 0)->plaintext;
|
$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);
|
$content = $this->fetchPostContent($url, self::URI);
|
||||||
$this->items[] = $this->buildItem($url, $title, $author, $time, $img, $content);
|
$this->items[] = $this->buildItem($url, $title, $author, $time, $img, $content);
|
||||||
unset($newsItem); // Some items are heavy, freeing the item proactively helps saving memory
|
unset($newsItem); // Some items are heavy, freeing the item proactively helps saving memory
|
||||||
|
@ -41,7 +41,7 @@ class GBAtempBridge extends BridgeAbstract
|
||||||
foreach ($html->find('li.portal_review') as $reviewItem) {
|
foreach ($html->find('li.portal_review') as $reviewItem) {
|
||||||
$url = urljoin(self::URI, $reviewItem->find('a.review_boxart', 0)->href);
|
$url = urljoin(self::URI, $reviewItem->find('a.review_boxart', 0)->href);
|
||||||
$img = $this->findItemImage($reviewItem, 'a.review_boxart');
|
$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);
|
$content = getSimpleHTMLDOMCached($url);
|
||||||
$author = $content->find('span.author--name', 0)->plaintext;
|
$author = $content->find('span.author--name', 0)->plaintext;
|
||||||
$time = $this->findItemDate($content);
|
$time = $this->findItemDate($content);
|
||||||
|
|
Loading…
Add table
Reference in a new issue