def trans_emoji(text):
    """
    @brief      Transform emoji html text to unicode
    @param      text  String
    @return     emoji unicode
    """
    def _emoji(matched):
        hex = matched.group(1)
        return ('\\U%08x' % int(hex, 16)).decode('unicode-escape').encode('utf-8')

    replace_t = re.sub(Constant.REGEX_EMOJI, _emoji, text)
    return replace_t

    @brief      Transform emoji html text to unicode
    @param      text  String
    @return     emoji unicode
    
wxbot_project_py2.7/wechat/utils.py