diff options
author | Andres Rey <[email protected]> | 2016-11-11 16:34:50 +0000 |
---|---|---|
committer | Andres Rey <[email protected]> | 2016-11-11 16:34:50 +0000 |
commit | a657e7121385e776c5dfee94fcd388fa487b2d40 (patch) | |
tree | cb1b4ee6cfa19f34b084890ce4ba783647d7d325 | |
parent | 8912f759effb8afc436c564fc3008ec8483b2489 (diff) |
Creating readability object on the first child (a div/domelement) instead of the DOMDocument
-rw-r--r-- | src/HTMLParser.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/HTMLParser.php b/src/HTMLParser.php index 851a367..7248da6 100644 --- a/src/HTMLParser.php +++ b/src/HTMLParser.php @@ -404,7 +404,7 @@ class HTMLParser $topCandidate->firstChild->appendChild($import); } - $topCandidate = new Readability($topCandidate); + $topCandidate = new Readability($topCandidate->firstChild); $topCandidate->initializeNode(); //TODO on the original code, $topCandidate is added to the page variable, which holds the whole HTML |