]> git.wh0rd.org - tt-rss.git/commitdiff
af_readability: specify http accept header
authorAndrew Dolgov <noreply@fakecake.org>
Fri, 25 May 2018 11:35:33 +0000 (14:35 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Fri, 25 May 2018 11:35:33 +0000 (14:35 +0300)
plugins/af_readability/init.php

index 8e420bfe3427a979f22699b1beeee3000c1a895c..2d08a621c6857f3630e58352bb7302d793fe03d2 100755 (executable)
@@ -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");