code: def lookup_symbol(company):
      ''' Fetch company info
      >>> lookup_symbol("Apple Inc.")
            {u'exch': u'NMS',
             u'market': u'NASDAQ',
             u'name': u'Apple Inc.',
             u'symbol': u'AAPL',
             u'type': u'Equity'}
      '''
      request = requests.get(FINANCE_URLS['info_lookup'].format(company))
      return json.loads(request.text[39:-1])["ResultSet"]["Result"] \
          if request.ok else {'error': request.reasonf lookup_symbol(company):
      ''' Fetch company info
      >>> lookup_symbol("Apple Inc.")
            {u'exch': u'NMS',
             u'market': u'NASDAQ',
             u'name': u'Apple Inc.',
             u'symbol': u'AAPL',
             u'type': u'Equity'}
      '''
      request = requests.get(FINANCE_URLS['info_lookup'].format(company))
      return json.loads(request.text[39:-1])["ResultSet"]["Result"] \
          if request.ok else {'error': request.reason}
docs: Fetch company info
      >>> lookup_symbol("Apple Inc.")
            {u'exch': u'NMS',
             u'market': u'NASDAQ',
             u'name': u'Apple Inc.',
             u'symbol': u'AAPL',
             u'type': u'Equity'}