add support for video[@src] in media cache

it's a valid alternative to a source[@src] child element:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video
This commit is contained in:
lllusion3418 2020-03-12 11:08:39 +01:00
parent cdde23b4dc
commit ec1b0befc7
2 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ class DiskCache {
$xpath = new DOMXPath($doc);
$cache = new DiskCache("images");
$entries = $xpath->query('(//img[@src]|//picture/source[@src]|//video[@poster]|//video/source[@src]|//audio/source[@src])');
$entries = $xpath->query('(//img[@src]|//picture/source[@src]|//video[@poster]|//video[@src]|//video/source[@src]|//audio/source[@src])');
$need_saving = false;

View File

@ -1229,7 +1229,7 @@ class RSSUtils {
if ($doc->loadHTML($html)) {
$xpath = new DOMXPath($doc);
$entries = $xpath->query('(//img[@src])|(//video/source[@src])|(//audio/source[@src])|(//video[@poster])');
$entries = $xpath->query('(//img[@src])|(//video/source[@src])|(//audio/source[@src])|(//video[@poster])|(//video[@src])');
foreach ($entries as $entry) {
foreach (array('src', 'poster') as $attr) {