Skip to content

A script that fetches news headlines from an RSS feed, rephrases them while preserving the meaning, using the ChatGPT API.

Notifications You must be signed in to change notification settings

bogeta11040/rephrase-rss-headlines

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

RSS Headline Rephraser

This Python script fetches news headlines from an RSS feed, rephrases them using the OpenAI GPT-3.5 model, and shuffles the rephrased headlines. The purpose is to generate alternative versions of the news headlines while preserving their meaning.

Usage

  1. Install the required dependencies:
pip install feedparser
pip install openai
  1. Set up the necessary variables:
  • Set the RSS_FEED_URL variable to the URL of your desired RSS feed.
  • Assign your OpenAI API key to the openai.api_key variable.
  1. Run the script:
python main.py
  1. The script will fetch the headlines from the specified RSS feed, rephrase them using the OpenAI GPT-3.5 model, shuffle the rephrased headlines, and display the results.

Notes

  • The rephrased headlines are limited to 50 tokens in length and are shuffled for variety.
  • The script ignores SSL verification due to potential SSL certificate issues.

About

A script that fetches news headlines from an RSS feed, rephrases them while preserving the meaning, using the ChatGPT API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages