How to find RSS feed of a particular website?

How to find RSS feed of a particular website? Whether there is any particular way to find it?


Solution 1:

You might be able to find it by looking at the source of the home page (or blog). Look for a line that looks like this:

<link rel="alternate" type="application/rss+xml" title="RSS Feed" href="http://example.org/rss" />

The href value will be where the RSS is located.

Solution 2:

There are multiple ways to get the RSS feed of the website.

What you can do is get the page source of a website and search for this link tag of type="application/rss+xml"

That will contain the RSS feed of that website, if any.

Here is a simple program in python that will print the RSS feed of any website, if any.

import requests  
from bs4 import BeautifulSoup  

def get_rss_feed(website_url):
    if website_url is None:
        print("URL should not be null")
    else:
        source_code = requests.get(website_url)
        plain_text = source_code.text
        soup = BeautifulSoup(plain_text)
        for link in soup.find_all("link", {"type" : "application/rss+xml"}):
            href = link.get('href')
            print("RSS feed for " + website_url + "is -->" + str(href))

get_rss_feed("http://www.extremetech.com/")

Save this file with the .py extension and run it. It will give you the rss feed url of that website.

Google also provides APIs to find the RSS feeds of a website. Please find them here: Google Feed API