#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
__title__ = 'msg'
__author__ = 'JieYuan'
__mtime__ = '19-3-22'
"""
tulingkey = ['3ac26126997942458c0d93de30d52212', '2e29921641b808e1986e20d4fc6e3238']

groupChat = {'ActualNickName': '',
             'ActualUserName': '@43486086bbffe130ce5b204f63700514',
             'AppInfo': {'AppID': '', 'Type': 0},
             'AppMsgType': 0,
             'Content': '[捂脸]',
             'CreateTime': 1553230393,
             'EncryFileName': '',
             'FileName': '',
             'FileSize': '',
             'ForwardFlag': 0,
             'FromUserName': '@43486086bbffe130ce5b204f63700514',
             'HasProductId': 0,
             'ImgHeight': 0,
             'ImgStatus': 1,
             'ImgWidth': 0,
             'IsAt': False,
             'MediaId': '',
             'MsgId': '6836131983376275',
             'MsgType': 1,
             'NewMsgId': 6836131983376275,
             'OriContent': '',
             'PlayLength': 0,
             'RecommendInfo': {'Alias': '',
                               'AttrStatus': 0,
                               'City': '',
                               'Content': '',
                               'NickName': '',
                               'OpCode': 0,
                               'Province': '',
                               'QQNum': 0,
                               'Scene': 0,
                               'Sex': 0,
                               'Signature': '',
                               'Ticket': '',
                               'UserName': '',
                               'VerifyFlag': 0},
             'Status': 3,
             'StatusNotifyCode': 0,
             'StatusNotifyUserName': '',
             'SubMsgType': 0,
             'Text': '[捂脸]',
             'Ticket': '',
             'ToUserName': '@@74991fcf83be1d4e68f511bf805476eab739b4c482eb4d76dccaccf72456653f',
             'Type': 'Text',
             'Url': '',
             'User': {'Alias': '',
                      'AppAccountFlag': 0,
                      'AttrStatus': 0,
                      'ChatRoomId': 0,
                      'City': '',
                      'ContactFlag': 0,
                      'DisplayName': '',
                      'EncryChatRoomId': '',
                      'HeadImgUrl': '/cgi-bin/mmwebwx-bin/webwxgetheadimg?seq=0&username=@@74991fcf83be1d4e68f511bf805476eab739b4c482eb4d76dccaccf72456653f&skey=@crypt_9ee03a29_4d023b3c29499174b3a14c2d35a4d76e',
                      'HideInputBarFlag': 0,
                      'IsAdmin': None,
                      'IsOwner': 1,
                      'KeyWord': '',
                      'MemberCount': 5,
                      'MemberList': '<ContactList: []>',
                      'NickName': '算法夸夸群',
                      'OwnerUin': 0,
                      'PYInitial': '',
                      'PYQuanPin': '',
                      'Province': '',
                      'RemarkName': '',
                      'RemarkPYInitial': '',
                      'RemarkPYQuanPin': '',
                      'Self': {'Alias': '',
                               'AppAccountFlag': 0,
                               'AttrStatus': 0,
                               'ChatRoomId': 0,
                               'City': '',
                               'ContactFlag': 0,
                               'DisplayName': '',
                               'EncryChatRoomId': '',
                               'HeadImgFlag': 1,
                               'HeadImgUrl': '/cgi-bin/mmwebwx-bin/webwxgeticon?seq=1002277237&username=@43486086bbffe130ce5b204f63700514&skey=@crypt_9ee03a29_4d023b3c29499174b3a14c2d35a4d76e',
                               'HideInputBarFlag': 0,
                               'KeyWord': '',
                               'MemberCount': 0,
                               'MemberList': '<ContactList: []>',
                               'NickName': 'Yuan',
                               'OwnerUin': 0,
                               'PYInitial': '',
                               'PYQuanPin': '',
                               'Province': '',
                               'RemarkName': '',
                               'RemarkPYInitial': '',
                               'RemarkPYQuanPin': '',
                               'Sex': 1,
                               'Signature': '价值＞可得性＝自由的生活！',
                               'SnsFlag': 49,
                               'StarFriend': 0,
                               'Statues': 0,
                               'Uin': 2173577180,
                               'UniFriend': 0,
                               'UserName': '@43486086bbffe130ce5b204f63700514',
                               'VerifyFlag': 0,
                               'WebWxPluginSwitch': 0},
                      'Sex': 0,
                      'Signature': '',
                      'SnsFlag': 0,
                      'StarFriend': 0,
                      'Statues': 1,
                      'Uin': 0,
                      'UniFriend': 0,
                      'UserName': '@@74991fcf83be1d4e68f511bf805476eab739b4c482eb4d76dccaccf72456653f',
                      'VerifyFlag': 0},
             'VoiceLength': 0}

friendChat = {'AppInfo': {'AppID': '', 'Type': 0},
              'AppMsgType': 0,
              'Content': '测试',
              'CreateTime': 1553234321,
              'EncryFileName': '',
              'FileName': '',
              'FileSize': '',
              'ForwardFlag': 0,
              'FromUserName': '@57b95cb426a1de3bbf67bd05ad3d6807',
              'HasProductId': 0,
              'ImgHeight': 0,
              'ImgStatus': 1,
              'ImgWidth': 0,
              'MediaId': '',
              'MsgId': '3089006954992701165',
              'MsgType': 1,
              'NewMsgId': 3089006954992701165,
              'OriContent': '',
              'PlayLength': 0,
              'RecommendInfo': {'Alias': '',
                                'AttrStatus': 0,
                                'City': '',
                                'Content': '',
                                'NickName': '',
                                'OpCode': 0,
                                'Province': '',
                                'QQNum': 0,
                                'Scene': 0,
                                'Sex': 0,
                                'Signature': '',
                                'Ticket': '',
                                'UserName': '',
                                'VerifyFlag': 0},
              'Status': 3,
              'StatusNotifyCode': 0,
              'StatusNotifyUserName': '',
              'SubMsgType': 0,
              'Text': '测试',
              'Ticket': '',
              'ToUserName': '@e99c2981f89de7f294695ce72af3ea21',
              'Type': 'Text',
              'Url': '',
              'User': {'Alias': '',
                       'AppAccountFlag': 0,
                       'AttrStatus': 98663,
                       'ChatRoomId': 0,
                       'City': '南京',
                       'ContactFlag': 2051,
                       'DisplayName': '',
                       'EncryChatRoomId': '',
                       'HeadImgUrl': '/cgi-bin/mmwebwx-bin/webwxgeticon?seq=688331961&username=@e99c2981f89de7f294695ce72af3ea21&skey=@crypt_9ee03a29_c135f1a215aedc234e39e02d44a82536',
                       'HideInputBarFlag': 0,
                       'IsOwner': 0,
                       'KeyWord': 'xia',
                       'MemberCount': 0,
                       'MemberList': '<ContactList: []>',
                       'NickName': '✨饕餮君妹纸✨',
                       'OwnerUin': 0,
                       'PYInitial': 'SPANCLASSEMOJIEMOJI2728SPANTTJMZSPANCLASSEMOJIEMOJI2728SPAN',
                       'PYQuanPin': 'spanclassemojiemoji2728spantaotiejunmeizhispanclassemojiemoji2728span',
                       'Province': '江苏',
                       'RemarkName': '万万',
                       'RemarkPYInitial': 'WW',
                       'RemarkPYQuanPin': 'wanwan',
                       'Sex': 2,
                       'Signature': '如果我的勇气是鱼。',
                       'SnsFlag': 49,
                       'StarFriend': 0,
                       'Statues': 0,
                       'Uin': 0,
                       'UniFriend': 0,
                       'UserName': '@e99c2981f89de7f294695ce72af3ea21',
                       'VerifyFlag': 0},
              'VoiceLength': 0}

# 公众号
mpChat = {'AppInfo': {'AppID': '', 'Type': 0},
          'AppMsgType': 0,
          'Content': '1',
          'CreateTime': 1553234945,
          'EncryFileName': '',
          'FileName': '',
          'FileSize': '',
          'ForwardFlag': 0,
          'FromUserName': '@9af0a634affd2f12b9b8dbad8717d4d1',
          'HasProductId': 0,
          'ImgHeight': 0,
          'ImgStatus': 1,
          'ImgWidth': 0,
          'MediaId': '',
          'MsgId': '3223860864517642314',
          'MsgType': 1,
          'NewMsgId': 3223860864517642314,
          'OriContent': '',
          'PlayLength': 0,
          'RecommendInfo': {'Alias': '',
                            'AttrStatus': 0,
                            'City': '',
                            'Content': '',
                            'NickName': '',
                            'OpCode': 0,
                            'Province': '',
                            'QQNum': 0,
                            'Scene': 0,
                            'Sex': 0,
                            'Signature': '',
                            'Ticket': '',
                            'UserName': '',
                            'VerifyFlag': 0},
          'Status': 3,
          'StatusNotifyCode': 0,
          'StatusNotifyUserName': '',
          'SubMsgType': 0,
          'Text': '1',
          'Ticket': '',
          'ToUserName': '@db70eb765f67754aba0a9a439d48ca6c',
          'Type': 'Text',
          'Url': '',
          'User': {'Alias': '',
                   'AppAccountFlag': 0,
                   'AttrStatus': 0,
                   'ChatRoomId': 0,
                   'City': '西安',
                   'ContactFlag': 3,
                   'DisplayName': '',
                   'EncryChatRoomId': '',
                   'HeadImgUrl': '/cgi-bin/mmwebwx-bin/webwxgeticon?seq=681083751&username=@db70eb765f67754aba0a9a439d48ca6c&skey=@crypt_9ee03a29_0586c2a0e6497059869e281f6a006537',
                   'HideInputBarFlag': 0,
                   'IsOwner': 0,
                   'KeyWord': 'gh_',
                   'MemberCount': 0,
                   'MemberList': '< ContactList: [] >',
                   'NickName': '老黑100招',
                   'OwnerUin': 0,
                   'PYInitial': 'LH100Z',
                   'PYQuanPin': 'laohei100zhao',
                   'Province': '陕西',
                   'RemarkName': '',
                   'RemarkPYInitial': '',
                   'RemarkPYQuanPin': '',
                   'Sex': 0,
                   'Signature': '不了解点厚黑，你就等着被人黑吧！',
                   'SnsFlag': 0,
                   'StarFriend': 0,
                   'Statues': 0,
                   'Uin': 0,
                   'UniFriend': 0,
                   'UserName': '@db70eb765f67754aba0a9a439d48ca6c',
                   'VerifyFlag': 24},
          'VoiceLength': 0}
