From 8c34492247971273b46250a0828b0d91805aaacc Mon Sep 17 00:00:00 2001 From: tema Date: Tue, 5 Sep 2023 00:18:35 +0300 Subject: [PATCH] Rebase server --- backup/google_parser/parser/utils.py | 3 ++- parser/utils.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/backup/google_parser/parser/utils.py b/backup/google_parser/parser/utils.py index 1240132..ccb387c 100644 --- a/backup/google_parser/parser/utils.py +++ b/backup/google_parser/parser/utils.py @@ -1,6 +1,7 @@ import os import datetime from datetime import datetime as dt +import base64 import requests @@ -198,7 +199,7 @@ class Helper(): ['inlineObjects'][id_doc]['inlineObjectProperties'] ['embeddedObject']['imageProperties']['contentUri']) r = requests.get(link, stream=True) - return r.raw + return base64.b64encode(r.content).decode('utf-8') @classmethod def find_image(cls, document): diff --git a/parser/utils.py b/parser/utils.py index 0c7721f..ede3578 100644 --- a/parser/utils.py +++ b/parser/utils.py @@ -1,6 +1,7 @@ import os import datetime from datetime import datetime as dt +import base64 import requests