/rss-feed-bot

Pings an RSS Feed and sends live updates

Primary LanguagePythonMIT LicenseMIT

RSS Feed Bot

The script scrapes RSS feeds (every 1 second, rotational) and shares it to Telegram or Twitter. It is intended to be used for live news but should support other similarly structured RSS feeds.

Live Example

Telegram: @SGLiveNews

Configuration

  1. Save config.yml.example as config.yml.
  2. Obtain twitter keys from Twitter Developer API Dashboard.
  3. Obtain telegram keys from Botfather.
  4. Create a telegram channel or group chat and obtain the chat_id. If your telegram channel is public, setting the chat_id as @linkname will work as well.
  5. Obtain a discord channel and obtain the webhook URL.
  6. Find an RSS Feed (e.g. Straits Times Singapore).
  7. Obtain root url (e.g. https://www.straitstimes.com/news/{feed}/rss.xml), {feed} is a template variable that will be filled in by the script.
  8. Fill in the various categories that you wish to scrape.
  9. You may include as many feeds as desired. The more feeds, the longer a cycle will take.
  10. You may disable specific services (twitter/telegram/discord) in the config file.

Using the script

  1. Python 3.6+ is required.
  2. pip install -r requirements.txt
  3. python main.py

Known Limitations

  • Twitter has a tendency to "ghostban" the account due to excessive link posting with similar message structure. Manual phone verification is needed every few hours.
  • Support for Telegram Instant View would be great.