如何使用 SyndicationFeed 从 rss 读取图像 url?

biz*_*biz 5 c# syndication image-processing

如何获取图片网址?假设标签是

    <media:thumbnail url="http://img.youtube.com/vi/y6_-cLWwEU0/default.jpg" width="120"
 height="90" />
Run Code Online (Sandbox Code Playgroud)

在syndicationFeed 中使用syndicationItem?

我有这样的东西

 Stream stream = e.Result;
                    XmlReader response = XmlReader.Create(stream);
                    SyndicationFeed feeds = SyndicationFeed.Load(response);
                    foreach (SyndicationItem ff in feeds.Items)
                    {

                        RssItem rssItem = new RssItem(ff.Title.Text, ff.Summary.Text, ff.PublishDate.ToString(), ff.Links[0].Uri.AbsoluteUri, **ff.image?????** );
                        rssItems.Add(rssItem);
                    }
Run Code Online (Sandbox Code Playgroud)

任何帮助?

小智 0

我还需要一个解决方案,我这样使用:

foreach (SyndicationItem item in feed.Items)
{
   int s,f;
        s = item.Summary.Text.IndexOf("<");
        f = item.Summary.Text.IndexOf("/>");

        if (f != -1)
            div1.InnerHtml += "</br>photo:" + item.Summary.Text.Substring(s, f + 1 - s);
}
Run Code Online (Sandbox Code Playgroud)

我从摘要中提取了img;