[Releases3DSBridge] Remove requests to IGN (#2246)

This part of the bridge was meant to find game info on IGN but rarely found useful results, and is harder to maintain than the rest of this bridge due to changes at IGN.
This commit is contained in:
ORelio 2021-08-13 05:52:57 +02:00 committed by GitHub
parent f36832b66e
commit 8a30480a45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,36 +46,6 @@ class Releases3DSBridge extends BridgeAbstract {
$type = extractFromDelimiters($element, '<type>', '</type>');
$card = extractFromDelimiters($element, '<card>', '</card>');
//Retrieve cover art and short desc from IGN?
$ignResult = false;
$ignDescription = '';
$ignLink = '';
$ignDate = time();
$ignCoverArt = '';
$ignSearchUrl = 'https://www.ign.com/search?q=' . urlencode($name);
if($ignResult = getSimpleHTMLDOMCached($ignSearchUrl)) {
$ignCoverArt = $ignResult->find('div.search-item-media', 0);
$ignDesc = $ignResult->find('div.search-item-description', 0);
$ignLink = $ignResult->find('div.search-item-sub-title', 0);
$ignDate = $ignResult->find('span.publish-date', 0);
if (is_object($ignCoverArt))
$ignCoverArt = $ignCoverArt->find('img', 0);
if (is_object($ignLink))
$ignLink = $ignLink->find('a', 1);
if (is_object($ignDate))
$ignDate = strtotime(trim($ignDate->plaintext));
if (is_object($ignCoverArt) && is_object($ignDesc) && is_object($ignLink)) {
$ignDescription = '<div><img src="'
. $ignCoverArt->src
. '" /></div><div>'
. $ignDesc->plaintext
. ' <a href="'
. $ignLink->href
. '">More at IGN</a></div>';
}
}
//Main section : Release description from 3DS database
$releaseDescription = '<h3>Release Details</h3><b>Release ID: </b>' . $id
. '<br /><b>Game Name: </b>' . $name