def update_sogou_login_cookie(self, username, cookie):
    '\n        更新搜狗微信登录 cookie 信息\n        :param username:\n        :param cookie:\n        :return:\n        '
    col = self.sogou_db['sogou_login_cookies']
    ctime = get_current_time()
    find_obj = {'nickname': username, 'is_valid': 1}
    login_item = col.find_one(find_obj)
    print(login_item)
    if (not login_item):
        cookie = ('DESC=0; %s' % cookie)
        col.insert_one({'cookie': cookie, 'nickname': username, 'device': '0', 'state': 'normal', 'c_time': ctime, 'm_time': ctime, 'is_valid': 1, 'failures': 0})
        return
    cookie = ('DESC=%s; %s' % (login_item['device'], cookie))
    col.update_one(find_obj, {'$set': {'state': 'normal', 'cookie': cookie, 'c_time': ctime, 'm_time': ctime, 'failures': 0}})
更新搜狗微信登录 cookie 信息
:param username:
:param cookie:
:return:
def update_sogou_login_cookie(self, username, cookie):
    '\n        更新搜狗微信登录 cookie 信息\n        :param username:\n        :param cookie:\n        :return:\n        '
    col = self.sogou_db['sogou_login_cookies']
    ctime = get_current_time()
    find_obj = {'nickname': username, 'is_valid': 1}
    login_item = col.find_one(find_obj)
    print(login_item)
    if (not login_item):
        cookie = ('DESC=0; %s' % cookie)
        col.insert_one({'cookie': cookie, 'nickname': username, 'device': '0', 'state': 'normal', 'c_time': ctime, 'm_time': ctime, 'is_valid': 1, 'failures': 0})
        return
    cookie = ('DESC=%s; %s' % (login_item['device'], cookie))
    col.update_one(find_obj, {'$set': {'state': 'normal', 'cookie': cookie, 'c_time': ctime, 'm_time': ctime, 'failures': 0}})