Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Releases3DS] Remove requests to IGN #2246

Merged
merged 1 commit into from
Aug 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions bridges/Releases3DSBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,36 +46,6 @@ protected function collectDataUrl($dataUrl){
$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
Expand Down