def path(url):
  from urlparse import urlparse
  if url:
    if '//' in url:
      return urlparse(url).path
    else:
      url = 'http://' + url
      return urlparse(url).path
  else:
    return None
dataset/ETHPy150Open miklevin/pipulate/common.py/path/original