Skip to content
Snippets Groups Projects
Commit f17c3ee2 authored by Andrew Dolgov's avatar Andrew Dolgov
Browse files

parser: fix get_links() for RSS

parent 5a6d7e7a
No related branches found
No related tags found
No related merge requests found
...@@ -105,7 +105,6 @@ class FeedParser { ...@@ -105,7 +105,6 @@ class FeedParser {
break; break;
case $this::FEED_RSS: case $this::FEED_RSS:
$title = $xpath->query("//channel/title")->item(0); $title = $xpath->query("//channel/title")->item(0);
if ($title) { if ($title) {
...@@ -200,7 +199,8 @@ class FeedParser { ...@@ -200,7 +199,8 @@ class FeedParser {
} }
break; break;
case $this::FEED_RSS: case $this::FEED_RSS:
$links = $this->xpath->query("//channel/link"); $links = $this->xpath->query("//atom:link");
foreach ($links as $link) { foreach ($links as $link) {
if (!$rel || $link->hasAttribute('rel') && $link->getAttribute('rel') == $rel) { if (!$rel || $link->hasAttribute('rel') && $link->getAttribute('rel') == $rel) {
array_push($rv, $link->getAttribute('href')); array_push($rv, $link->getAttribute('href'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment