protected static function getRssItems(\SimpleXMLElement $items)
    {
        $rssItems = [];

        $namespaces = $items->getNamespaces(true);

        foreach ($items as $item) {
            $rssItem = [
                'url' => null,
                'originUrl' => null,
                'pubdate' => null,
            ];

            $rssItem['url'] = (string) $item->link;
            $rssItem['originUrl'] = ((string) $item->origLink ?: (string) $item->comments);
            $rssItem['pubdate'] = ((string) $item->pubdate ?: (string) $item->pubDate);

            if (!$rssItem['pubdate'] && isset($namespaces['dc']) && ($children = $item->children($namespaces['dc']))) {
                $rssItem['pubdate'] = (string) $children->date;
            }

            if (!$rssItem['originUrl'] && isset($namespaces['feedburner']) && ($children = $item->children($namespaces['feedburner']))) {
                $rssItem['originUrl'] = (string) $children->origLink;
            }

            if ($rssItem['url']) {
                $rssItems[] = $rssItem;
            }
        }

        return $rssItems;
    }