summaryrefslogtreecommitdiff
path: root/src/main.cpp
blob: f936e85dfc89618ae8f8bedba281670798cf8f40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "RSS.hpp"
#include <curl/curl.h>
#include <memory>

int main() {
    // auto tmp = RSS_leaf::TokenizeXML("<test> abc </test>");
    auto rss = std::make_unique<RSS>("https://www.independent.co.uk/news/uk/rss");
    rss->channelInfo.print();
    int i = 0;
    for (auto entry : rss->Entries) {
        if (i > 3) break;
        entry.print();
        ++i;
    }
    // auto rss_1 = std::make_unique<RSS>("https://feeds.washingtonpost.com/rss/world");
    // auto rss_2 = std::make_unique<RSS>("https://news.yahoo.com/rss/mostviewed");
    // for (auto entry : rss_2->Entries)
        // entry.print();

    return 0;
}