From: Christian Weiske Date: Sun, 8 Mar 2020 22:37:31 +0000 (+0100) Subject: Fix accept header in crawler X-Git-Url: https://git.cweiske.de/phinde.git/commitdiff_plain/e9a75e18860a20a7510229d9467a1af87ba4f7b3?hp=eca6e9af6dea38f5912c881a5dc05193e1b19848 Fix accept header in crawler --- diff --git a/src/phinde/Fetcher.php b/src/phinde/Fetcher.php index 7cf11b7..666d7ed 100644 --- a/src/phinde/Fetcher.php +++ b/src/phinde/Fetcher.php @@ -29,7 +29,7 @@ class Fetcher $types = array(); foreach ($actions as $action) { - $types = array_merge($action::$supportedTypes); + $types = array_merge($types, array_keys($action::$supportedTypes)); } $types = array_unique($types); diff --git a/src/phinde/Indexer.php b/src/phinde/Indexer.php index bdd5236..4885b7a 100644 --- a/src/phinde/Indexer.php +++ b/src/phinde/Indexer.php @@ -4,8 +4,8 @@ namespace phinde; class Indexer { static $supportedTypes = array( - 'application/xhtml+xml', - 'text/html', + 'application/xhtml+xml' => true, + 'text/html' => true, ); public function run(Retrieved $retrieved)