parameters: (new=False)
return_statement: return '{}:{}'.format(
          g_zhima_last_proxy['ip'], g_zhima_last_proxy['port']
      ) if g_zhima_last_proxy else None
docstring: 从芝麻获取代理
  
      :param boolean new: True 强制重新申请 | False 尽可能使用上次获取的代理ip
      :return: None | 'host ip:port'， 如: '183.164.239.57:4264'
docstring_summary: 从芝麻获取代理
docstring_tokens: 从芝麻获取代理
function: def get_proxy(new=False):
      """从芝麻获取代理
  
      :param boolean new: True 强制重新申请 | False 尽可能使用上次获取的代理ip
      :return: None | 'host ip:port'， 如: '183.164.239.57:4264'
      """
      global g_zhima_last_proxy
      g_zhima_lock.acquire()
      if new or g_zhima_last_proxy is None:
          g_zhima_last_proxy = request_proxy_from_zhima()
      else:
          current_time = datetime.datetime.now()
          if current_time >= g_zhima_last_proxy['expire_time']:  # 简单不严格的时间判断，两者时间可能不同步
              g_zhima_last_proxy = request_proxy_from_zhima()
      g_zhima_lock.release()
      return '{}:{}'.format(
          g_zhima_last_proxy['ip'], g_zhima_last_proxy['port']
      ) if g_zhima_last_proxy else None
function_tokens: def get_proxy ( new = False ) : global g_zhima_last_proxy g_zhima_lock . acquire ( ) if new or g_zhima_last_proxy is None : g_zhima_last_proxy = request_proxy_from_zhima ( ) else : current_time = datetime . datetime . now ( ) if current_time >= g_zhima_last_proxy [ 'expire_time' ] : # 简单不严格的时间判断，两者时间可能不同步 g_zhima_last_proxy = request_proxy_from_zhima ( ) g_zhima_lock . release ( ) return '{}:{}' . format ( g_zhima_last_proxy [ 'ip' ] , g_zhima_last_proxy [ 'port' ] ) if g_zhima_last_proxy else None