title: a python script to query a website from local machine
body: <p>I am new to python and i tried implementing <a href="https://stackoverflow.com/questions/11770636/a-python-script-to-query-mit-start-website-from-local-machine/17844004?noredirect=1#comment26048315_17844004">a python script to query MIT START website from local machine</a> 
  concept in Python3.3</p>
  
  <pre><code>import urllib.parse
  import urllib.request
  
  url = 'http://start.csail.mit.edu/'
  values = { 'query': 'What is the capital of China?' }
  
  data = urllib.parse.urlencode(values)
  binary_data = data.encode('ascii')
  req = urllib.request.Request(url, binary_data)
  response = urllib.request.urlopen(req)
  the_page = response.read()
  
  print (the_page)
  </code></pre>
  
  <p>the resulting print here just gives me the HTML code for "<a href="http://start.csail.mit.edu/" rel="nofollow noreferrer">http://start.csail.mit.edu/</a>" and not the resulting answer page. Any ideas on what I might be doing wrong.</p>
  
  <p>Thanks in advance</p>