af_readability: specify http accept header
This commit is contained in:
parent
68d9c412ea
commit
b037ffd628
1 changed files with 4 additions and 1 deletions
|
@ -141,7 +141,10 @@ class Af_Readability extends Plugin {
|
||||||
|
|
||||||
if (!class_exists("Readability")) require_once(dirname(dirname(__DIR__)). "/lib/readability/Readability.php");
|
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) {
|
if ($tmp && mb_strlen($tmp) < 1024 * 500) {
|
||||||
$tmpdoc = new DOMDocument("1.0", "UTF-8");
|
$tmpdoc = new DOMDocument("1.0", "UTF-8");
|
||||||
|
|
Loading…
Reference in a new issue