Fix accept header in crawler
authorChristian Weiske <cweiske@cweiske.de>
Sun, 8 Mar 2020 22:37:31 +0000 (23:37 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Sun, 8 Mar 2020 22:37:31 +0000 (23:37 +0100)
src/phinde/Fetcher.php
src/phinde/Indexer.php

index 7cf11b77ec92f1df0b8f67e38c3b78834fb00558..666d7eda2449a6240a14d657bca6844922ecf3da 100644 (file)
@@ -29,7 +29,7 @@ class Fetcher
 
         $types = array();
         foreach ($actions as $action) {
 
         $types = array();
         foreach ($actions as $action) {
-            $types = array_merge($action::$supportedTypes);
+            $types = array_merge($types, array_keys($action::$supportedTypes));
         }
         $types = array_unique($types);
 
         }
         $types = array_unique($types);
 
index bdd5236a72d973b1eaa6b03cd355163deb9149cd..4885b7a9fb86e1cbbb09cda23806925e82f66adc 100644 (file)
@@ -4,8 +4,8 @@ namespace phinde;
 class Indexer
 {
     static $supportedTypes = array(
 class Indexer
 {
     static $supportedTypes = array(
-        'application/xhtml+xml',
-        'text/html',
+        'application/xhtml+xml' => true,
+        'text/html'             => true,
     );
 
     public function run(Retrieved $retrieved)
     );
 
     public function run(Retrieved $retrieved)