简体   繁体   English

如何使用 Python 解码编码的 email 地址?

[英]How to decode an encoded email address with Python?

What's the best way to decode the following string?解码以下字符串的最佳方法是什么? I have a few emails that are being encoded.我有几封正在编码的电子邮件。 A sample encoded email is below.示例编码 email 如下。

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

Just use module html只需使用模块 html

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM