url parsing
This project is a simple URL Parsing Tool built using Python. It takes a URL as input from the user and manually extracts important components such as the protocol, domain name, and page/path using string operations.
The project helps in understanding how URLs are structured and how Python string methods like slicing and find() can be used for real-world problems.
-
Takes a URL as user input
-
Extracts:
- Protocol (e.g.,
https) - Domain name (e.g.,
google) - Page / path (e.g.,
/search?q=python)
- Protocol (e.g.,
-
Uses manual string parsing (no external libraries)
-
Beginner-friendly and easy to understand
- Python
- String methods (
find(), slicing)
-
Make sure Python is installed on your system
-
Clone this repository or download the file
-
Run the program:
python url_parser.py
-
Enter a valid URL when prompted
https://www.google.com/search?q=python
protocol: https
domain: google
page: /search?q=python
Note
This project uses manual URL parsing for learning purposes
It works best with URLs containing www and a page/path
Advanced parsing can be done using Python’s urllib.parse module
Author
Neesa Syed