def synccheck(self):
        """
        @brief      check whether there's a message
        @return     [retcode, selector]
                    retcode: 0    successful
                             1100 logout
                             1101 login otherwhere
                    selector: 0 nothing
                              2 message
                              6 unkonwn
                              7 webwxsync
        """
        params = {
            'r': int(time.time()),
            'sid': self.sid,
            'uin': self.uin,
            'skey': self.skey,
            'deviceid': self.device_id,
            'synckey': self.synckey,
            '_': int(time.time()),
        }
        url = self.wx_conf['API_synccheck'] + '?' + urllib.urlencode(params)
        data = get(url)
        reg = r'window.synccheck={retcode:"(\d+)",selector:"(\d+)"}'
        pm = re.search(reg, data)
        retcode = pm.group(1)
        selector = pm.group(2)
        return [retcode, selector]

        @brief      check whether there's a message
        @return     [retcode, selector]
                    retcode: 0    successful
                             1100 logout
                             1101 login otherwhere
                    selector: 0 nothing
                              2 message
                              6 unkonwn
                              7 webwxsync
        
wxbot_project_py2.7/wechat/wechat_apis.py