def download_image_base64(self, url): response = requests.get(url) return base64.encodebytes(response.content)