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.
- 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).
- Python
requestsfor fetching website contentBeautifulSoupfor HTML parsinglangchainfor accessing OpenAI's model
-
Clone the Repository
git clone https://github.com/mattburrell/website-summarizer.git cd website-summarizer -
Set Up a Virtual Environment
python3 -m venv venv source venv/bin/activate -
Install Dependencies
pip install -r requirements.txt
-
Create a
.envfile in the project directory and add your OpenAI API keyecho "OPENAI_API_KEY=your_openai_api_key" > .env
-
Run the Script
python main.py
- Enter a website URL when prompted.
- The tool will fetch the content and provide a concise summary.
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.
This project is licensed under the MIT License.
Contributions are welcome! Feel free to open an issue or submit a pull request.
- Built with the power of LangChain and OpenAI.
- Web scraping powered by BeautifulSoup.