I'm new to Python and especially to web coding. I'm trying to make a program that asks for a name and a surname, and then check on Pipl if there is any result(s). My "tactic" is to directly go to the URL (containing the information) with the result, without using POST method to complete the fields of the website. I tried this:
import http.client
name = input("Name: ")
surname = input("Surname: ")
url = "pipl.com/search/?q=" + name + "+" + surname + "&l=&sloc=&in=5"
conn = http.client.HTTPSConnection(url, 443)
conn.putrequest('GET', '/')
conn.endheaders()
r = conn.getresponse()
print(r.read())
And I'm getting this error:
socket.gaierror: [Errno -2] Name or service not known
I think that's because I don't only use the domain name (pipl.com), but nothing helps me, I still stuck here.
I also told myself that using POST will be maybe easier. I repeat, I'm very new to web coding (and I don't have the best English), I'm learning, so thanks for your help !