import logging


def clean_eventbrite_url (url):
   """ Remove unneeded query info from Eventbrite URL
   """

   if url.find('?') >= 0:
       try:
           base, params = url.split("?", 1) 
       except ValueError as e:
           logging.error(
             "Could not split." 
             "Offending url is {}".format(url))
           return url

       return base

   return url