【问题标题】:How to decode an encoded email address with Python?如何使用 Python 解码编码的电子邮件地址?
【发布时间】:2021-01-04 19:02:53
【问题描述】:

解码以下字符串的最佳方法是什么? 我有一些正在编码的电子邮件。下面是一个示例编码的电子邮件。

encoded_string = "Info@doverhouseresort.com"
decoded_string = "Info@doverhouseresort.com"

【问题讨论】:

标签: python encoding utf-8 character-encoding decode


【解决方案1】:

只需使用模块 html

import html
encoded_string = "Info@doverhouseresort.com"
decoded_string = html.unescape(encoded_string)

【讨论】:

    猜你喜欢
    • 2012-12-14
    • 1970-01-01
    • 1970-01-01
    • 2021-08-21
    • 2021-06-17
    • 1970-01-01
    • 2014-07-01
    • 2013-07-16
    • 1970-01-01
    相关资源
    最近更新 更多