A basic web scraper built using Python and Flask that extracts and displays domain information from provided URLs. The application supports various TLDs (Top-Level Domains) such as .com, .co.uk, .ac.in, etc.
- Web Scraper: Extracts the base domain (e.g.,
www.example.com) from a given URL, including complex domains likewww.college.ac.in. - Flask Web Interface: A simple web interface to input URLs and view the extracted domain information.
- Error Handling: Handles common HTTP errors (e.g., 400, 500) gracefully.
- Python 3.7+
- Flask 2.3.3
- tldextract 3.4.0
- Requests 2.31.0
- BeautifulSoup4 4.12.2
- Python 3.7 or higher
- pip (Python package installer)
- python -m venv venv
- On Windows
-
- venv\Scripts\activate
- On macOS/Linux
-
- source venv/bin/activate
- pip install -r requirements.txt
- python app.py
- Open your web browser and navigate to http://127.0.0.1:5000.
- web-scraper-flask/
- │
- ├── app.py
- ├── requirements.txt
- ├── templates/
- │ └── index.html
- ├── static/
- │ └── style.css
- └── README.md