use correct meta robots attribute
authorChristian Weiske <cweiske@cweiske.de>
Thu, 11 Feb 2016 16:00:58 +0000 (17:00 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 11 Feb 2016 16:00:58 +0000 (17:00 +0100)
src/phinde/LinkExtractor/Html.php

index 0d6f3d8..4acd19f 100644 (file)
@@ -21,10 +21,10 @@ class Html
 
         $dx = new \DOMXPath($doc);
 
 
         $dx = new \DOMXPath($doc);
 
-        $meta = $dx->evaluate('/html/head/meta[@name="robots" and @value]')
+        $meta = $dx->evaluate('/html/head/meta[@name="robots" and @content]')
             ->item(0);
         if ($meta) {
             ->item(0);
         if ($meta) {
-            $robots = $meta->attributes->getNamedItem('value')->textContent;
+            $robots = $meta->attributes->getNamedItem('content')->textContent;
             foreach (explode(',', $robots) as $value) {
                 if (trim($value) == 'nofollow') {
                     //we shall not follow the links
             foreach (explode(',', $robots) as $value) {
                 if (trim($value) == 'nofollow') {
                     //we shall not follow the links