diff --git a/Transformer/InsertTransformer.php b/Transformer/InsertTransformer.php index f840a8b..af2afeb 100644 --- a/Transformer/InsertTransformer.php +++ b/Transformer/InsertTransformer.php @@ -50,19 +50,20 @@ public function transform($entry) { Minz_Log::error("GFYCAT API ERROR - {$href}"); } } elseif (preg_match('#(?Predgifs.com/)(.*/)*(?P[^/\-.]*)#', $href, $matches)) { - try { - $jsonResponse = file_get_contents("https://api.redgifs.com/v1/gfycats/{$matches['token']}"); - $arrayResponse = json_decode($jsonResponse, true); - - if (JSON_ERROR_NONE !== json_last_error()) { - throw new Exception(); - } - - $dom = $this->generateDom('Redgifs with token', [new Video('video/mp4', $arrayResponse['gfyItem']['mp4Url'])]); - $entry->_content("{$dom->saveHTML()}{$content->getRaw()}"); - } catch (Exception $e) { - Minz_Log::error("REDGIFS API ERROR - {$href}"); - } + // API has changed and this code does not work anymore. + // try { + // $jsonResponse = file_get_contents("https://api.redgifs.com/v1/gfycats/{$matches['token']}"); + // $arrayResponse = json_decode($jsonResponse, true); + + // if (JSON_ERROR_NONE !== json_last_error()) { + // throw new Exception(); + // } + + // $dom = $this->generateDom('Redgifs with token', [new Video('video/mp4', $arrayResponse['gfyItem']['mp4Url'])]); + // $entry->_content("{$dom->saveHTML()}{$content->getRaw()}"); + // } catch (Exception $e) { + // Minz_Log::error("REDGIFS API ERROR - {$href}"); + // } } elseif (preg_match('#v.redd.it#', $href)) { try { $jsonResponse = file_get_contents("{$content->getCommentsLink()}.json"); diff --git a/metadata.json b/metadata.json index d11d6a2..df874fe 100644 --- a/metadata.json +++ b/metadata.json @@ -2,7 +2,7 @@ "name": "Reddit Image", "author": "Alexis Degrugillier", "description": "Modify reddit entries by displaying known medias and easing access to the linked resource", - "version": "0.11.1", + "version": "0.12.1", "entrypoint": "RedditImage", "type": "user" }