summaryrefslogtreecommitdiff
path: root/src/Readability.php
diff options
context:
space:
mode:
authorAndres Rey <[email protected]>2016-12-12 00:43:18 +0000
committerAndres Rey <[email protected]>2016-12-12 00:43:18 +0000
commita58b71b728e820fe68fae2b9477e13d8ab8f5a7f (patch)
treee504a225f88122985d0a7463ad641eccfe856151 /src/Readability.php
parent1fb1351943e27ca9d690a9e87c70ef4e1812a8ba (diff)
Added recursion to re-run the algorithm in case no quality content is found.
Diffstat (limited to 'src/Readability.php')
-rw-r--r--src/Readability.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Readability.php b/src/Readability.php
index 9255bc6..8d6ecc4 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -198,8 +198,11 @@ class Readability extends Element implements ReadabilityInterface
*/
public function getClassWeight()
{
- // if(!Config::FLAG_WEIGHT_CLASSES) return 0;
-
+// TODO To implement. How to get config from html parser from readability
+// if ($this->getConfig()->getOption('weightClasses')) {
+// return 0;
+// }
+//
$weight = 0;
// Look for a special classname