I have following code in python 3.5.
import urllib.request
prof_list = open(r"C:\local\profanity.txt")
contents = prof_list.read()
connect = urllib.request.urlopen("http://wdyl.com/profanity?q="+contents)
output = connect.read()
connect.close()
prof_list.close()
when I run the code, I get
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 400: Bad Request
Could not figure despite multiple efforts.