From: Andrew Dolgov Date: Fri, 25 May 2018 11:35:33 +0000 (+0300) Subject: af_readability: specify http accept header X-Git-Tag: 18.8~29 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=b037ffd628b62a68c9aceb4726d7e8d58b47b89c;p=tt-rss.git af_readability: specify http accept header --- diff --git a/plugins/af_readability/init.php b/plugins/af_readability/init.php index 8e420bfe..2d08a621 100755 --- a/plugins/af_readability/init.php +++ b/plugins/af_readability/init.php @@ -141,7 +141,10 @@ class Af_Readability extends Plugin { if (!class_exists("Readability")) require_once(dirname(dirname(__DIR__)). "/lib/readability/Readability.php"); - $tmp = fetch_file_contents(array("url" => $url, "type" => "text/html")); + $tmp = fetch_file_contents([ + "url" => $url, + "http_accept" => "text/*", + "type" => "text/html"]); if ($tmp && mb_strlen($tmp) < 1024 * 500) { $tmpdoc = new DOMDocument("1.0", "UTF-8");