def download_png(msg): source = msg['FromUserName'] msg['Text'](msg['FileName']) itchat.send(msg['FileName'], source)