Парсинг outlook python
У меня есть парсер, проблема в том что я не могу спарсить все данные. Данный код парсит последнее сообщение. Если у вас пример или подскажите.
import win32com.client
outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI")
inbox = outlook.GetDefaultFolder(5) # "6" refers to the index of a folder - in this case,
# the inbox. You can change that number to reference
# any other folder
messages = inbox.Items
message = messages.GetLast()
body_content = message.body
print(body_content)