Skip to content

Script in Python to send latest posts from RSS Feed of a website (georgians.gr) to Discord Channel

Notifications You must be signed in to change notification settings

luzede/rss-feed-to-discord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RSS Feed to Discord

This is a simple script that reads the feed from a site and outputs the content to a Discord channel through a channel webhook url.

HOW TO RUN

Clone the repository and cd into it. Then I recommend to create a virtual environment by running:

python -m venv env
source env/bin/activate

and install the required libraries:

pip install -r requirements.txt

Then all you have to do is create a .env file inside the cloned directory with following fields:

DISCORD_CHANNEL_WEBHOOK_URL="PASTE WEBHOOK URL HERE"
FEED_URL="PASTE RSS FEED URL HERE"

and run:

python main.py

SETTING UP A CRON JOB

If you are using linux, you can set up a CRON job to run the script every so often. This command opens CRONtab editor, if it is your first time using it, it will ask you to choose a default text editor. My usual choice is nano editor. Choose your default editor.

crontab -e

After that you can append something like this at the end of the file and save.

*/10 * * * * /path_to_cloned_directory/env/bin/python /path_to_cloned_directory/main.py

This will tell to run the script every 10 minutes.

About

Script in Python to send latest posts from RSS Feed of a website (georgians.gr) to Discord Channel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages