def volume(keyword):
  if 'semrush' in globs.config:
    apikey = globs.config['semrush']
    try:
      call = 'http://api.semrush.com/?type=phrase_this&export_columns=Nq&phrase=%s&key=%s&database=us' % (keyword, apikey)
      respobj = requests.get(call, timeout=5)
      rtext = respobj.text
      out(rtext)
    except:
      return "Double-check your semrush entry in the Config tab."
    try:
      return rtext.splitlines()[1]
    except:
      return "-1"
  else:
    return "In the Config tab, put semrush under name and the api key under value to proceed."
dataset/ETHPy150Open miklevin/pipulate/common.py/volume/original