diff options
-rw-r--r-- | src/Readability.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Readability.php b/src/Readability.php index 2cad398..f913d80 100644 --- a/src/Readability.php +++ b/src/Readability.php @@ -626,6 +626,12 @@ class Readability $matchString = $node->getAttribute('class') . ' ' . $node->getAttribute('id'); + if (!$node->isProbablyVisible()) { + $this->logger->debug(sprintf('[Get Nodes] Removing hidden node... Match string was: \'%s\'', $matchString)); + $node = NodeUtility::removeAndGetNext($node); + continue; + } + // Check to see if this node is a byline, and remove it if it is. if ($this->checkByline($node, $matchString)) { $this->logger->debug(sprintf('[Get Nodes] Found byline, removing... Node content was: \'%s\'', substr($node->nodeValue, 0, 128))); |