Website Scraper AI is an evidence-first research crawler for a single website. It reads robots.txt, discovers sitemap URLs, downloads allowed HTML pages, cleans page text, extracts headings, links, dates, and snippets, then asks a local Qwen AI server to plan research and produce a sourced final answer.
The finished run is saved to website_research.json with the website, question, plan, answer, downloaded pages, discovered URLs, rejected requests, and research history.
- Checks
robots.txtbefore downloading pages. - Discovers sitemap files from
robots.txtand common sitemap paths. - Handles normal
.xmland compressed.xml.gzsitemaps. - Builds a same-domain URL catalogue.
- Downloads and cleans HTML pages with Beautiful Soup.
- Removes scripts, styles, forms, iframes, SVG, canvas, and other noisy page elements.
- Scores and selects useful URLs for the research question.
- Sends research planning, URL selection, and final-answer prompts to a local Qwen endpoint.
- Prints the final answer, confidence level, and evidence URLs.
- Saves all run data to JSON for later inspection.
- Python 3.10 or newer. The current local environment was tested with Python 3.13.
- A running Qwen-compatible local HTTP server.
- Internet access for the target website and for first-time dependency installation.
Python packages:
requestsbeautifulsoup4lxml
The default Qwen endpoint is set inside main.py and AI_server.py:
QWEN_SERVER="http://192.168.86.243:5001/process"Change this value if your Qwen server runs on a different host or port. The endpoint should accept JSON POST requests and return JSON responses.
Approximate sizes vary by operating system, CPU architecture, Python version, and package wheel availability.
| Item | Approximate size |
|---|---|
| Repository source files | Less than 1 MB |
| Python installer, Windows | 25-35 MB |
| Python installer, macOS | 35-55 MB |
Python packages downloaded by pip | 5-20 MB |
| Created virtual environment after install | 25-80 MB |
Current local venv/ size | About 30 MB |
Typical website_research.json output | Depends on site size; often 100 KB to 20+ MB |
The virtual environment is not committed to Git. Each user recreates it locally from requirements.txt.
- Install Python 3 from https://www.python.org/downloads/windows/.
- During installation, enable Add python.exe to PATH if available.
- Clone or download this repository.
- Start your local Qwen server.
- Edit
QWEN_SERVERinmain.pyif needed. - Double-click
run.bat, or run this from Command Prompt:
run.batThe script creates venv, installs dependencies, and starts the researcher.
- Install Python 3 from https://www.python.org/downloads/macos/ or with Homebrew:
brew install python- Clone or download this repository.
- Start your local Qwen server.
- Edit
QWEN_SERVERinmain.pyif needed. - Run:
chmod +x run.sh
./run.shInstall Python and virtual environment support:
sudo apt update
sudo apt install python3 python3-venv python3-pipThen run:
chmod +x run.sh
./run.shOn Fedora:
sudo dnf install python3 python3-pip
chmod +x run.sh
./run.shOn Arch Linux:
sudo pacman -S python python-pip
chmod +x run.sh
./run.shUse these commands if you prefer not to use the launch scripts:
python3 -m venv venv
venv/bin/python -m pip install -r requirements.txt
venv/bin/python main.pyOn Windows Command Prompt:
py -3 -m venv venv
venv\Scripts\python.exe -m pip install -r requirements.txt
venv\Scripts\python.exe main.pyWhen the program starts, enter:
- The website URL to research.
- The question you want answered from that website.
Example:
Website URL:
> https://example.com
What do you want to know?
> What services does this company offer?
The program will crawl allowed pages, ask Qwen to guide the research, print the final answer, and write website_research.json.
- This tool researches one website at a time.
- It only downloads same-domain HTML pages.
- It skips pages blocked by
robots.txt. - It may stop if a page appears to be a CAPTCHA, browser check, or access-denied challenge.
- Large websites are bounded by internal limits such as maximum sitemap URLs, downloaded pages per round, text per page, and Qwen URL list size.
- Results depend on the quality and availability of the target website and the local Qwen server.
main.py- Main interactive research crawler.AI_server.py- Duplicate/alternate entrypoint kept with the current project source.requirements.txt- Python dependencies.run.sh- macOS/Linux launcher.run.bat- Windows launcher.
git init
git remote add origin https://github.com/programmingrobot/Website_Scraper_AI
git add .
git commit -m "Initial Commit"