Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想从电子邮件中获取正文并在终端上打印。
我从 google API 获得了以下代码,但不知道如何以人类可读的文本查看正文:
msg_str = base64.urlsafe_b64decode(message['raw'].encode('ASCII')) mime_msg = email.message_from_string(msg_str) print(mime_msg.get_payload())
print不起作用。我的问题有合适的解决方案吗?
print