mercredi 25 novembre 2020

Listen to RSS Feeds on Update C#

I am retrieving data from this RSS feed.

public static void Main(string[] args)
{
    const string url = "https://myanimelist.net/rss/news.xml";
    XmlReader reader = XmlReader.Create(url);
    SyndicationFeed feed = SyndicationFeed.Load(reader);
    reader.Close();
    foreach (var item in feed.Items)
    {
        Console.WriteLine(item.Title.Text);
    }
}

It gets the latest news posts. However, how can I "listen" to the feed so I know when a new post is updated?




Aucun commentaire:

Enregistrer un commentaire