def _get_proxy_net_location(proxy_settings):
 if ('@' in proxy_settings):
  protocol = proxy_settings.split(':')[0]
  netloc = proxy_settings.split('@')[1]
  return ('%s://%s' % (protocol, netloc))
 else:
  return proxy_settings

def _get_proxy_net_location ( proxy_settings ) : if ( '@' in proxy_settings ) : protocol = proxy_settings . split ( ':' ) [ 0 ] netloc = proxy_settings . split ( '@' ) [ 1 ] return ( '%s://%s' % ( protocol , netloc ) ) else : return proxy_settings
returns proxy host and port .