diff options
-rw-r--r-- | providers/Rss.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/providers/Rss.php b/providers/Rss.php index 8e20e3f..61e5321 100644 --- a/providers/Rss.php +++ b/providers/Rss.php @@ -31,13 +31,13 @@ class Rss extends \Providers\XmlFeed { protected function _mapItems($content) { $items = []; foreach ($content as $contentString) { - $itemString = str_replace(['content:encoded>', '<dc:', '</dc:', '<media:', '</media:', '<wfw:', '</wfw:'], ['content>', '<', '</', '<', '</', '<', '</'], $contentString); + $itemString = str_replace(['content:encoded>', '<yt:', '</yt:', '<dc:', '</dc:', '<media:', '</media:', '<wfw:', '</wfw:'], ['content>', '<', '</', '<', '</', '<', '</', '<', '</'], $contentString); $item = new \SimpleXMLElement($itemString); $itemObject = new Item(); $itemObject->ID = strval($item->id ?: $item->guid) ?: ltrim(parse_url(strval($item->link))['path'], '/'); $itemObject->Title = strval($item->title); $itemObject->Time = strval($item->published ?: $item->pubDate ?: $item->updated); - $itemObject->Text = strval($item->summary ?: $item->description ?: $item->content) ?: ($item->description ?: $item->content)->children()->asXML(); + $itemObject->Text = strval($item->summary ?: $item->description ?: $item->content ?: $item->group->description); $itemObject->Link = strval(isset($item->link['href']) ? $item->link->attributes()['href'] : $item->link); $itemObject->Author = strval($item->creator ? $item->creator : (is_string($item->author) ? $item->author : $item->author->name)); $items[] = $itemObject; |