def tvmaze_lookup(lookup_type, lookup_values):
 lookup_url = (BASE_URL + TVMAZE_ENDPOINTS[lookup_type].format(*lookup_values))
 log.debug(u'querying tvmaze API with the following URL: %s', lookup_url)
 try:
  result = requests.get(lookup_url).json()
 except RequestException as e:
  raise LookupError(e.args[0])
 return result

def tvmaze_lookup ( lookup_type , lookup_values ) : lookup_url = ( BASE_URL + TVMAZE_ENDPOINTS [ lookup_type ] . format ( * lookup_values ) ) log . debug ( u'querying tvmaze API with the following URL: %s' , lookup_url ) try : result = requests . get ( lookup_url ) . json ( ) except RequestException as e : raise LookupError ( e . args [ 0 ] ) return result
build the url and return the reply from tvmaze api .