An open API service indexing awesome lists of open source software.

https://github.com/abhaysingh71/ai-web-reader-chatbot-extention

AI-Web-Reader-Chatbot-Extension is a smart Chrome extension that lets you interact with any webpage using AI. It scrapes and analyzes the content of the current website and answers your questions in real time. Powered by advanced language models, it delivers accurate and concise answers based only on the page content.
https://github.com/abhaysingh71/ai-web-reader-chatbot-extention

ai-assistant beautifulsoup browser-extension chatbot chrome-extension data-science flask-api gemeni-api javascript langchain large-language-models natural-language-processing python selenium web-ai webscrapping

Last synced: 2 months ago
JSON representation

AI-Web-Reader-Chatbot-Extension is a smart Chrome extension that lets you interact with any webpage using AI. It scrapes and analyzes the content of the current website and answers your questions in real time. Powered by advanced language models, it delivers accurate and concise answers based only on the page content.

Awesome Lists containing this project

README

          

๐Ÿง  AI Web Reader Chatbot Extension



A Chrome Extension that scrapes webpage content and uses Google Gemini 2.0 Flash via LangChain to intelligently answer user questions based on the current page content.


It supports smart webpage parsing using BeautifulSoup, LangChain WebBaseLoader, and SeleniumURLLoader โ€” making it highly versatile for both static and JavaScript-heavy websites. Ideal for product pages, portfolio sites, news articles, blog summaries, and more.


![ChatGPT Image May 12, 2025, 09_39_58 PM](https://github.com/user-attachments/assets/9e0460d0-f486-4d9e-b0b1-79bc30187035)

https://github.com/user-attachments/assets/a9931e11-671e-4ec3-9354-cb091389fa0f

๐Ÿ“ธ Demo Preview



| ![Screenshot 1](assets/photo1.png) | ![Screenshot 2](assets/photo2.png) |
|---------------------------------|---------------------------------|

๐Ÿ’ก Features



  • โœ… Chrome Extension UI

  • โœ… Scrapes and analyzes live webpage content using BeautifulSoup

  • โœ… Supports both static and dynamic pages via WebBaseLoader and SeleniumURLLoader

  • โœ… Uses LangChain with gemini-2.0-flash for blazing fast, contextual responses

  • โœ… Answers questions intelligently based on current webpage context

  • โœ… Secure Gemini API key using .env

  • โœ… Clean, modular Flask backend


๐Ÿ“ Project Structure




AI_Web_Reader_Extension/
โ”‚
โ”œโ”€โ”€ Backend/ # Flask API for Gemini
โ”‚ โ””โ”€โ”€ app.py # Main backend logic
โ”œโ”€โ”€ popup.html # Extension popup UI
โ”œโ”€โ”€ popup.js # Frontend logic for chat
โ”œโ”€โ”€ manifest.json # Chrome Extension manifest
โ”œโ”€โ”€ content.js # content script
โ”œโ”€โ”€ background.js # background logic
โ”œโ”€โ”€ .env # Contains API key (not pushed)
โ”œโ”€โ”€ .gitignore # Ignores venv, .env, logs
โ”œโ”€โ”€ requirements.txt # Python dependencies
โ””โ”€โ”€ README.md # You're reading it!


๐Ÿš€ How to Run

๐Ÿงช 1. Backend Setup




git clone https://github.com/AbhaySingh71/AI-Web-Reader-Chatbot-Extention.git
cd AI-Web-Reader-Chatbot-Extention

# Create virtual environment
python -m venv venv
venv\Scripts\activate # or source venv/bin/activate (Linux/mac)

# Install dependencies
pip install -r requirements.txt

๐Ÿ”‘ 2. Create .env file




GOOGLE_API_KEY=your_gemini_api_key_here
USER_AGENT=ai-web-reader-bot

You can get your Gemini API key from: https://makersuite.google.com/app/apikey

โš™๏ธ 3. Run the Flask server


python app.py

๐Ÿงฉ 4. Load Chrome Extension



  1. Go to chrome://extensions/

  2. Enable Developer Mode

  3. Click Load Unpacked

  4. Select your project folder


๐Ÿ’ป Technologies Used



  • ๐Ÿง  Google Gemini 2.0 Flash (via google-generativeai)

  • ๐Ÿ”— LangChain

  • ๐ŸŒ BeautifulSoup

  • ๐Ÿ•น๏ธ LangChain WebBaseLoader

  • ๐Ÿ“ธ LangChain SeleniumURLLoader

  • ๐Ÿงช Flask

  • ๐ŸŽจ HTML, CSS, JavaScript (Chrome Extension)


๐Ÿ” Security




  • .env is not pushed to GitHub


  • venv/, .pyc, and logs are ignored

  • Only requirements.txt is tracked for clean dependency install


๐Ÿ“ฃ Credits



Built with โค๏ธ by Abhay Singh

Powered by Google Gemini, LangChain