This commit is contained in:
tema 2023-09-05 00:54:53 +03:00
parent 2b1fdfc8a0
commit a2477521fa
Signed by: tema
GPG Key ID: 21FDB6D162488F6F

View File

@ -205,9 +205,9 @@ class Helper():
def find_image(cls, document): def find_image(cls, document):
for i in document['body']["content"]: for i in document['body']["content"]:
if ("paragraph" in i) and ("elements" in i["paragraph"]): if ("paragraph" in i) and ("elements" in i["paragraph"]):
if "inlineObjectElement" in i["paragraph"]["elements"]: if "inlineObjectElement" in i["paragraph"]["elements"][0]:
return True, cls.get_link_and_download( return True, cls.get_link_and_download(
i["paragraph"]["elements"] i["paragraph"]["elements"][0]
['inlineObjectElement']['inlineObjectId'], document) ['inlineObjectElement']['inlineObjectId'], document)
return False, None return False, None