2 回复
# TODO: 获取临时素材 get (疑问?主要是返回结果乱码问题)
def get_media_id(request):
publicName = request.POST.get('publicName', None)
media_id = request.POST.get("media_id", None)
url = 'https://api.weixin.qq.com/cgi-bin/media/get?'
params = {
"access_token": get_token(**{"publicName": publicName}), # 获取token
"media_id": media_id,
}
res = requests.get(url, params=params)
return HttpResponse(res.text)