This Python script monitors an RSS feed for specific keywords and posts relevant articles to a Slack channel using a webhook.
- Fetches the latest articles from an RSS feed
- Checks the article content for specified keywords
- Posts matching articles to a Slack channel using a webhook
- Supports fetching article content using the Requests library
- Python 3.x
feedparserlibrary: Install usingpip install feedparserrequestslibrary: Install usingpip install requests
-
Clone the repository or download the script file.
-
Install the required libraries by running the following command:
pip install feedparser requests -
Update the script with your specific configuration:
- Set the
rss_feed_urlvariable to the URL of your desired RSS feed. - Modify the
keywordslist with the keywords you want to monitor. - Set the
slack_webhook_urlvariable to the URL of your Slack webhook.
- Set the
-
Run the script:
python rss_keyword_monitor.py -
The script will fetch the latest articles from the RSS feed, check them for the specified keywords, and post the matching articles to the configured Slack channel.
- You can customize the behavior of the script by modifying the variables at the beginning of the script.
- You can adjust the list of keywords to monitor by adding or removing keywords from the
keywordslist. - Feel free to enhance the script with additional functionalities as per your requirements.
- Ensure you have the necessary permissions to access the RSS feed and the target Slack channel.
- Make sure to comply with the terms of service of the RSS feed and Slack.
This project is licensed under the MIT License.