So i've been spending some time trying to learn how to write http request
my goal is to request the html of a web page parse and extract data from there
Im having trouble understanding how I can do this if i dont have the exact path to the file and all i have is the basic url like www.google.com
in a way im trying to do what urllib.request does but manually with socket programming in python
#Playing with Sockets
import socket
target_port=80
target_url ='www.google.com'
client=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
client.connect((target_url,target_port))
request= "GET https://www.google.com HTTP/1.1\nHost:google.com\n\n"
message= request.encode()
client.send(message)
response=client.recv(4096)
print(response.decode())