Skip to content

A Python-based tool that retrieves the content of a specified website and generates a concise summary using OpenAI's GPT API

License

Notifications You must be signed in to change notification settings

mattburrell/website-summarizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Website Summarizer

A Python-based tool that retrieves the content of a specified website and generates a concise summary using OpenAI's GPT API. This tool is perfect for quickly understanding lengthy articles, blogs, or online resources.


Features

  • Fetches and extracts text from any website URL.
  • Summarizes the content using OpenAI's gpt-4o-mini model.
  • Lightweight and easy to use.
  • Customizable to focus on specific content (e.g., articles, blog posts).

Tech Stack

  • Python
  • requests for fetching website content
  • BeautifulSoup for HTML parsing
  • langchain for accessing OpenAI's model

Setup Instructions

  1. Clone the Repository

    git clone https://github.com/mattburrell/website-summarizer.git
    cd website-summarizer
  2. Set Up a Virtual Environment

    python3 -m venv venv
    source venv/bin/activate
  3. Install Dependencies

    pip install -r requirements.txt
  4. Create a .env file in the project directory and add your OpenAI API key

    echo "OPENAI_API_KEY=your_openai_api_key" > .env
  5. Run the Script

    python main.py

Usage

  1. Enter a website URL when prompted.
  2. The tool will fetch the content and provide a concise summary.

Example Output

Input URL:
https://en.wikipedia.org/wiki/Python_(programming_language)

Summary:
Python is a high-level, general-purpose programming language known for its simplicity and versatility. It supports multiple programming paradigms and has a vast standard library, making it widely used for various applications such as web development, data analysis, and artificial intelligence.


License

This project is licensed under the MIT License.


Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.


Acknowledgments

About

A Python-based tool that retrieves the content of a specified website and generates a concise summary using OpenAI's GPT API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages