Skip to content

Commit

Permalink
updated to working RSS feeds
Browse files Browse the repository at this point in the history
  • Loading branch information
cbourke committed Sep 4, 2023
1 parent e0ca9c3 commit 7ab357e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ figures/_minted*
# binaries
*.o
runRss
rssTest
curlTest
a.out
solution/
30 changes: 16 additions & 14 deletions rss/rss_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,13 @@ static const RssService cseBitsAndBytes = {
RSS2
};

/**
* RSS feed for Husker athletics news
*/
static const RssService huskerNews = {
"Husker Sports News",
"https://huskers.com/rss.aspx",
RSS2
};

/**
* RSS feed for the University of Nebraska-Omaha
*/
static const RssService unoNews = {
"University of Nebraska-Omaha",
"https://www.unomaha.edu/news/index.rss",
RSS2
static const RssService unlNews = {
"University of Nebraska-Lincoln",
"https://events.unl.edu/upcoming/?format=rss",
ATOM1
};

/**
Expand All @@ -50,7 +41,18 @@ static const RssService unoNews = {
static const RssService reddit = {
"Reddit",
"https://www.reddit.com/.rss",
ATOM1};
ATOM1
};

/**
* An RSS feed of Pintrest's front page.
*/
static const RssService pintrest = {
"Pintrest",
"https://newsroom.pinterest.com/en/feed/news.xml",
RSS2
};


/**
* A utility function to parse an XML feed from an RSS feed
Expand Down
4 changes: 2 additions & 2 deletions rss/runRss.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ int main(int argc, char **argv) {
if (argc > 1) {
int choice = atoi(argv[1]);
if (choice == 2) {
s = huskerNews;
s = unlNews;
} else if (choice == 3) {
s = reddit;
} else if (choice == 4) {
s = unoNews;
s = pintrest;
}
}

Expand Down

0 comments on commit 7ab357e

Please sign in to comment.