Skip to content

This Python script is designed to find RSS or Atom feeds on a given website

License

Notifications You must be signed in to change notification settings

levysoft/RSS-Finder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RSS Finder

Description

This Python script (rss_finder.py) is designed to find RSS or Atom feeds on a given website. It tries multiple strategies, including looking for <link> tags in the HTML head that point to a feed, as well as trying common feed URL patterns.

Requirements

  • Python 3
  • Libraries: urllib.parse, html5lib, feedparser, requests. You can install these libraries using pip:
    pip install html5lib feedparser requests
    
    or install dependencies:
    
    `pip install -r requirements.txt`
    

Installation

To set up the development environment:

  1. Clone the repository:

    git clone https://github.com/levysoft/RSS-Finder

  2. Enter the project directory:

    cd RSS-Finder

  3. Create a Python virtual environment:

    python3 -m venv venv

  4. Activate the virtual environment:

    • On Windows:
      .\venv\Scripts\activate
      
    • On Unix or MacOS:
      source venv/bin/activate
      
  5. Install dependencies:

    pip install -r requirements.txt

Usage

To use the script, run it with a single argument: the URL of the website you want to find the feed for. For example:

python3 rss_finder.py https://example.com

How it Works

The script makes a request to the given URL and parses the HTML response. It then searches for elements that point to Atom or RSS feeds. If none are found, it tries appending common feed paths to the base URL to see if any valid feeds exist.

Attribution

This script is inspired by and based on the autodiscovery functionality found in the RSS aggregator Temboz, specifically in the autodiscovery module: Temboz Autodiscovery Module.

Author

Antonio Troise

License

This project is released under the MIT License. See the LICENSE file for more details.