summaryrefslogtreecommitdiff
path: root/src/Readability.php
diff options
context:
space:
mode:
authorAndres Rey <[email protected]>2018-11-25 21:14:07 +0000
committerAndres Rey <[email protected]>2018-11-25 21:14:07 +0000
commit3046a6ae3e1610e9c2d60e9c4c72d817c286ad4b (patch)
tree6c2122220a26738faed3512b90f81bf3091ef083 /src/Readability.php
parent2d542fee0bcb4c315461b69d47f3f4cac4ec7b25 (diff)
Search for the main image while looking for metadata
Diffstat (limited to 'src/Readability.php')
-rw-r--r--src/Readability.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Readability.php b/src/Readability.php
index 877cea9..9ebb19a 100644
--- a/src/Readability.php
+++ b/src/Readability.php
@@ -287,10 +287,10 @@ class Readability
$values = [];
// property is a space-separated list of values
- $propertyPattern = '/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title)\s*/i';
+ $propertyPattern = '/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title|image)\s*/i';
// name is a single value
- $namePattern = '/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title)\s*$/i';
+ $namePattern = '/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|image)\s*$/i';
// Find description tags.
foreach ($this->dom->getElementsByTagName('meta') as $meta) {