code: def create_timestamp_anti_leech_url(host, file_name, query_string, encrypt_key, deadline):
      
      if query_string:
          url_to_sign = '{0}/{1}?{2}'.format(host, urlencode(file_name), query_string)
      else:
          url_to_sign = '{0}/{1}'.format(host, urlencode(file_name))
  
      path = '/{0}'.format(urlencode(file_name))
      expire_hex = str(hex(deadline))[2:]
      str_to_sign = '{0}{1}{2}'.format(encrypt_key, path, expire_hex).encode()
      sign_str = hashlib.md5(str_to_sign).hexdigest()
  
      if query_string:
          signed_url = '{0}&sign={1}&t={2}'.format(url_to_sign, sign_str, expire_hex)
      else:
          signed_url = '{0}?sign={1}&t={2}'.format(url_to_sign, sign_str, expire_hex)
  
      return signed_url
docs: 创建时间戳防盗链
  
      Args:
          host:              带访问协议的域名
          file_name:         原始文件名，不需要urlencode
          query_string:      查询参数，不需要urlencode
          encrypt_key:       时间戳防盗链密钥
          deadline:          链接有效期时间戳（以秒为单位）
  
      Returns:
          带时间戳防盗链鉴权访问链接