diff options
author | Andres Rey <[email protected]> | 2016-12-26 19:36:56 -0300 |
---|---|---|
committer | Andres Rey <[email protected]> | 2016-12-26 19:36:56 -0300 |
commit | 1b0ac19d31473b728edfb2e72d3ec0cf1ebac35f (patch) | |
tree | b62c455c92c9a53a51392d3f06180e9743022146 /src/HTMLParser.php | |
parent | 8f3569038aff80a9bae7cde4ddcbb5a2debedabd (diff) |
Restored the if to select the main image of the article
Diffstat (limited to 'src/HTMLParser.php')
-rw-r--r-- | src/HTMLParser.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/HTMLParser.php b/src/HTMLParser.php index 4a5ff29..a8c28ff 100644 --- a/src/HTMLParser.php +++ b/src/HTMLParser.php @@ -380,10 +380,10 @@ class HTMLParser $metadata = $values = []; // Match "description", or Twitter's "twitter:description" (Cards) // in name attribute. - $namePattern = '/^\s*((twitter)\s*:\s*)?(description|title)\s*$/i'; + $namePattern = '/^\s*((twitter)\s*:\s*)?(description|title|image)\s*$/i'; // Match Facebook's Open Graph title & description properties. - $propertyPattern = '/^\s*og\s*:\s*(description|title)\s*$/i'; + $propertyPattern = '/^\s*og\s*:\s*(description|title|image)\s*$/i'; foreach ($this->dom->getElementsByTagName('meta') as $meta) { /* @var Readability $meta */ |