python实现将base64编码的图片下载到本地

# -*- coding:utf-8 -*-
#!python3
import os
import base64
sss ="""base64的编码"""
print(len(sss))
imagedata = base64.b64decode(sss)
print(imagedata)
file = open('1.jpg',"wb")
file.write(imagedata)
file.close()
原文地址:https://www.cnblogs.com/luyanru66/p/9664415.html