This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.import socket
#url = 'http://data.pr4e.org/romeo.txt'
url = input("Enter url: ")
if not url.__contains__('//'):
raise Exception('Invalid url!!')
hostname = url.split('/')
mysock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)