1Feed / feedback

The place to leave feature requests and bug reports for 1Feed!
https://1feed.app
15 stars 0 forks source link

Open source repository of rss feeds #62

Open ferminrp opened 3 years ago

ferminrp commented 3 years ago

Since for some websites it is hard to find, it would be great to start an open source repository of where the feed is located on each domain 🙃

Booligoosh commented 3 years ago

You mean the hard-coded feeds for when they can't be auto-detected? It's actually a JavaScript (well, TypeScript) file rather than a static file like JSON as there are some sites (eg. ESPN) that require a little bit of custom logic. That might make it a little complicated to open-source since it's code rather than data. Here's the file currently:

import { Entity, EntityType } from "../types";

// This file contains feeds for common sites where the feed can't be auto-detected
export function getHardcodedEntity(domainWithoutWww: string): Entity | null {
  switch (domainWithoutWww) {
    case "whitehouse.gov":
      return {
        type: EntityType.rss,
        name: "The White House",
        url: "https://www.whitehouse.gov/",
        feedUrls: ["https://www.whitehouse.gov/feed/"],
      };

    case "cnn.com":
    case "edition.cnn.com":
      return {
        type: EntityType.rss,
        name: "CNN",
        url: "https://edition.cnn.com/",
        feedUrls: ["http://rss.cnn.com/rss/edition.rss"],
      };

    case "cnbc.com":
      return {
        type: EntityType.rss,
        name: "CNBC",
        url: "https://www.cnbc.com/",
        feedUrls: ["https://www.cnbc.com/id/100003114/device/rss/rss.html"],
      };

    case "msnbc.com":
      return {
        type: EntityType.rss,
        name: "MSNBC",
        url: "https://www.msnbc.com/",
        feedUrls: ["https://feeds.nbcnews.com/msnbc/public/news"],
      };

    case "cbsnews.com":
      return {
        type: EntityType.rss,
        name: "CBS News",
        url: "https://www.cbsnews.com/",
        feedUrls: ["https://www.cbsnews.com/latest/rss/main"],
      };

    case "aeon.co":
      // Aeon does have a link to an RSS feed which would be picked
      // up, but they use React to render it client - side :(
      return {
        type: EntityType.rss,
        name: "Aeon",
        url: "https://aeon.co/",
        feedUrls: ["https://aeon.co/feed.rss"],
      };

    case "makeuseof.com":
      return {
        type: EntityType.rss,
        name: "MakeUseOf",
        url: "https://www.makeuseof.com/",
        feedUrls: ["https://www.makeuseof.com/feed/"],
      };

    case "bbc.com":
    case "bbc.co.uk":
      return {
        type: EntityType.rss,
        name: "BBC",
        url: "https://www.bbc.co.uk/",
        feedUrls: ["https://feeds.bbci.co.uk/news/rss.xml"],
      };

    case "espn.com":
    case "espn.co.uk":
    case "espn.com.au":
      // ESPN has multiple different editions on different domains,
      // but they all have the same feed path.
      return {
        type: EntityType.rss,
        name: "ESPN",
        url: `https://www.${domainWithoutWww}/`,
        feedUrls: [`https://www.${domainWithoutWww}/espn/rss/news`],
      };

    case "bloomberg.com":
      return {
        type: EntityType.rss,
        name: "Bloomberg",
        url: "https://www.bloomberg.com/",
        feedUrls: ["https://www.bloomberg.com/politics/feeds/site.xml"],
      };

    case "bostonglobe.com":
      return {
        type: EntityType.rss,
        name: "The Boston Globe",
        url: "https://www.bostonglobe.com/",
        feedUrls: ["https://www.bostonglobe.com/rss/feedly.xml"],
      };

    case "washingtonpost.com":
      return {
        type: EntityType.rss,
        name: "The Washington Post",
        url: "https://www.washingtonpost.com/",
        feedUrls: ["http://feeds.washingtonpost.com/rss/national"],
      };

    case "axios.com":
      return {
        type: EntityType.rss,
        name: "Axios",
        url: "https://www.axios.com/",
        feedUrls: ["https://www.axios.com/feeds/feed.rss"],
      };

    case "ewn.co.za":
      return {
        type: EntityType.rss,
        name: "Eyewitness News",
        url: "https://ewn.co.za/",
        feedUrls: ["https://ewn.co.za/RSS%20Feeds/Latest%20News"],
      };

    default:
      return null;
  }
}
ferminrp commented 3 years ago

That's exactly what I meant