From: Christian Weiske Date: Thu, 11 Feb 2016 16:00:58 +0000 (+0100) Subject: use correct meta robots attribute X-Git-Tag: v0.1.0~3 X-Git-Url: https://git.cweiske.de/phinde.git/commitdiff_plain/fd98bb30be8970309c52d3fc3a1585d7454b370a?ds=sidebyside use correct meta robots attribute --- diff --git a/src/phinde/LinkExtractor/Html.php b/src/phinde/LinkExtractor/Html.php index 0d6f3d8..4acd19f 100644 --- a/src/phinde/LinkExtractor/Html.php +++ b/src/phinde/LinkExtractor/Html.php @@ -21,10 +21,10 @@ class Html $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) { - $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