From 18b5c8ec6da64da90706643ffa52736a85a2ca59 Mon Sep 17 00:00:00 2001 From: Inverle Date: Sun, 22 Jun 2025 00:09:18 +0200 Subject: Handle redirects when scraping feed from HTML (#7654) * Handle redirects when scraping feed from HTML * pass codesniffer * pass PHPStan * Optimize * Another approach relying on HTML base Standard way to save an HTML document with relative references * Fix case of existing HTML base which should not be overriden --------- Co-authored-by: Alexandre Alapetite --- app/Controllers/extensionController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/Controllers') diff --git a/app/Controllers/extensionController.php b/app/Controllers/extensionController.php index 5afa43bd8..ef63c38d2 100644 --- a/app/Controllers/extensionController.php +++ b/app/Controllers/extensionController.php @@ -48,7 +48,7 @@ class FreshRSS_extension_Controller extends FreshRSS_ActionController { $cacheFile = CACHE_PATH . '/extension_list.json'; if (FreshRSS_Context::userConf()->retrieve_extension_list === true) { if (!file_exists($cacheFile) || (time() - (filemtime($cacheFile) ?: 0) > 86400)) { - $json = httpGet($extensionListUrl, $cacheFile, 'json'); + $json = httpGet($extensionListUrl, $cacheFile, 'json')['body']; } else { $json = @file_get_contents($cacheFile) ?: ''; } -- cgit v1.2.3