parser/rss: try to get link from guid isPermaLink=true

This commit is contained in:
Andrew Dolgov 2013-05-20 15:01:18 +04:00
parent 8a50539c44
commit 042003d55e
1 changed files with 6 additions and 0 deletions

View File

@ -25,6 +25,12 @@ class FeedItem_RSS extends FeedItem_Common {
return $link->getAttribute("href"); return $link->getAttribute("href");
} }
$link = $this->elem->getElementsByTagName("guid")->item(0);
if ($link && $link->hasAttributes() && $link->getAttribute("isPermaLink") == "true") {
return $link->nodeValue;
}
$link = $this->elem->getElementsByTagName("link")->item(0); $link = $this->elem->getElementsByTagName("link")->item(0);
if ($link) { if ($link) {