python base64 encode image from url