title: Scraping in python to using open api
body: <p>i want to scraping "www.naver.com"
  so i tried to scraping using open api
  i wrote code following this:</p>
  
  <pre><code>import urllib.request
  import urllib.parse
  from bs4 import BeautifulSoup
  defaultURL = 'http://openapi.naver.com/search?&amp;'
  key = 'key=keyvalue'
  target='&amp;target=news'
  sort='&amp;sort=sim'
  start='&amp;start=1'
  display='&amp;display=100'
  query='&amp;query='+urllib.parse.quote_plus(str(input("write:")))
  
  fullURL=defaultURL+key+target+sort+start+display+query
  
  print(fullURL)
  file=open("C:\\Users\\kimty\\Desktop\\k\\python\\N\\naver_news.txt","w",encoding='utf-8')
  
  f=urllib.request.urlopen(fullURL)
  resultXML=f.read()
  xmlsoup=BeautifulSoup(resultXML,'html.parser')
  
  items=xmlsoup.find._all('item')
  
  for item in items:
      file.write('---------------------------------------\n')
      file.write('title :'+item.tile.get_text(strip=True)+'\n')
      file.write('contents : '+item.description.get_text(strip=True)+'\n')
      file.write('\n')
  
  file.close()
  </code></pre>
  
  <p>but python shell only show this</p>
  
  <blockquote>
  <pre><code>============= RESTART: C:\Users\kimty\Desktop\kpython\N\N.py =============
  write:lee
  http://openapi.naver.com/search?&amp;key=keyvalue&amp;target=news&amp;sort=sim&amp;start=1&amp;display=100&amp;query=lee
  Traceback (most recent call last):
    File "C:\Users\kimty\Desktop\k\python\N\N.py", line 19, in &lt;module&gt;
      f=urllib.request.urlopen(fullURL)
    File "C:\Python34\lib\urllib\request.py", line 161, in urlopen
      return opener.open(url, data, timeout)
    File "C:\Python34\lib\urllib\request.py", line 464, in open
      response = self._open(req, data)
    File "C:\Python34\lib\urllib\request.py", line 482, in _open
      '_open', req)
    File "C:\Python34\lib\urllib\request.py", line 442, in _call_chain
      result = func(*args)
    File "C:\Python34\lib\urllib\request.py", line 1211, in http_open
      return self.do_open(http.client.HTTPConnection, req)
    File "C:\Python34\lib\urllib\request.py", line 1186, in do_open
      r = h.getresponse()
    File "C:\Python34\lib\http\client.py", line 1227, in getresponse
      response.begin()
    File "C:\Python34\lib\http\client.py", line 386, in begin
      version, status, reason = self._read_status()
    File "C:\Python34\lib\http\client.py", line 356, in _read_status
      raise BadStatusLine(line)
  http.client.BadStatusLine: ''
  </code></pre>
  </blockquote>
  
  <p>why this happening?
  what about that python shell talk to me?
  i am using windows 8.1 64x, python 3.4.4</p>