remove old-style readability loading

This commit is contained in:
Andrew Dolgov 2018-06-20 22:17:10 +03:00
parent add9b37ab5
commit acf155cf8f
2 changed files with 0 additions and 4 deletions

View file

@ -142,8 +142,6 @@ class Af_Readability extends Plugin {
public function extract_content($url) { public function extract_content($url) {
global $fetch_effective_url; global $fetch_effective_url;
if (!class_exists("Readability")) require_once(dirname(dirname(__DIR__)). "/lib/readability/Readability.php");
$tmp = fetch_file_contents([ $tmp = fetch_file_contents([
"url" => $url, "url" => $url,
"http_accept" => "text/*", "http_accept" => "text/*",

View file

@ -557,8 +557,6 @@ class Af_RedditImgur extends Plugin {
if (!defined('NO_CURL') && function_exists("curl_init") && $this->host->get($this, "enable_readability") && if (!defined('NO_CURL') && function_exists("curl_init") && $this->host->get($this, "enable_readability") &&
mb_strlen(strip_tags($article["content"])) <= 150) { mb_strlen(strip_tags($article["content"])) <= 150) {
if (!class_exists("Readability")) require_once(dirname(dirname(__DIR__)). "/lib/readability/Readability.php");
// do not try to embed posts linking back to other reddit posts // do not try to embed posts linking back to other reddit posts
if ($url && strpos($url, "reddit.com") === FALSE) { if ($url && strpos($url, "reddit.com") === FALSE) {