summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Readability.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Readability.php b/src/Readability.php
index 97b6597..48aff05 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -126,15 +126,15 @@ class Readability
{
$this->dom = $this->loadHTML($html);
- $this->getMetadata();
-
- $this->getMainImage();
-
// Checking for minimum HTML to work with.
if (!($root = $this->dom->getElementsByTagName('body')->item(0)) || !$root->firstChild) {
throw new ParseException('Invalid or incomplete HTML.');
}
+ $this->getMetadata();
+
+ $this->getMainImage();
+
while (true) {
$root = $root->firstChild;