1import socket
2
3target_host = "www.google.com"
4target_port = 80
5
6# create a socket object
7client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
8
9# connect the client
10client.connect((target_host,target_port))
11
12# receive some data
13response = client.recv(4096)
14print(f'Source Code: {response}')
15http_response = repr(response)