mirror of https://tt-rss.org/git/tt-rss.git
Check 'head' and 'body' when searching HTML for feed links.
YouTube, for some reason, puts theirs in 'body'.
This commit is contained in:
parent
d832907125
commit
7a5ea2a2b9
|
@ -2097,8 +2097,8 @@ class Feeds extends Handler_Protected {
|
|||
$doc = new DOMDocument();
|
||||
if (@$doc->loadHTML($content)) {
|
||||
$xpath = new DOMXPath($doc);
|
||||
$entries = $xpath->query('/html/head/link[@rel="alternate" and '.
|
||||
'(contains(@type,"rss") or contains(@type,"atom"))]|/html/head/link[@rel="feed"]');
|
||||
$entries = $xpath->query('/html/*[self::head or self::body]/link[@rel="alternate" and '.
|
||||
'(contains(@type,"rss") or contains(@type,"atom"))]|/html/*[self::head or self::body]/link[@rel="feed"]');
|
||||
|
||||
foreach ($entries as $entry) {
|
||||
if ($entry->hasAttribute('href')) {
|
||||
|
|
Loading…
Reference in New Issue