Closed Sg4Dylan closed 8 years ago
uin_to_account是通过uin获取QQ号,从你所提供的log来看,返回值没有问题
请问现在如何通过这个方法取得的uin获得真实QQ号?对于群聊天,似乎每次新的回话这个值都会变动
这个是bot在群里运行收到消息产生的log,log里的 uid account 都不是QQ号
account不是qq号么?
准确的说,这并不是发送消息者的QQ号
虽然我没用过该项目,不过我也在维护自己的QQ Api项目,这个接口的作用是通过某个人的uin(通过接收消息、好友列表、群成员等方式获得)得到他的QQ号(account字段),可以确认传入的uin是否正确么?
刚测试了一下,获取的是正确的QQ号,无论群成员(发送消息者)是否与机器人是好友关系,QQ号获取都是正确的,但是群号获取似乎有问题。
难道咱这样的是抽风么
2016-02-11 06:25:55,315 Group.py[line:81] INFO msg handling.
2016-02-11 06:25:55,317 QQLogin.py[line:340] INFO Requesting the account by uin: 129560223
2016-02-11 06:25:55,957 QQLogin.py[line:346] DEBUG uin_to_account html: {u'retcode': 0, u'result': {u'account': 2289472214, u'uin': 129560223, u'uiuin': u''}}
2016-02-11 06:25:55,963 connectionpool.py[line:758] INFO Starting new HTTPS connection (1): api.telegram.org
2016-02-11 06:25:56,585 connectionpool.py[line:387] DEBUG "GET /botTOKENS/sendMessage?text=%5BQQ%5D%5B2289472214%5D%3A+%E6%9C%89&chat_id=-19145073 HTTP/1.1" 200 231
2016-02-11 06:25:56,593 Group.py[line:84] INFO msg transport done
2016-02-11 06:25:56,597 Group.py[line:89] INFO evaling callout
2016-02-11 06:25:56,598 MsgHandler.py[line:153] DEBUG queue handling.Now queue length:0
2016-02-11 06:26:00,883 QQLogin.py[line:256] DEBUG check_msg html: {"result":[{"poll_type":"group_message","value":{"content":[["font",{"color":"000000","name":"微软雅黑","size":10,"style":[0,0,0]}],"服务器在日本"],"from_uin":2347949558,"group_code":2347949558,"msg_id":8546,"msg_type":0,"send_uin":129560223,"time":1455193560,"to_uin":739258581}}],"retcode":0}
2016-02-11 06:26:00,885 MsgHandler.py[line:40] INFO [8546]【群用户(2289472214)】:服务器在日本
没有办法确定原因,看来协议又改动了。并且同时确定的是真实群号的获取机制也进行了修改。
这位群成员的真实QQ号是8799开头么?
不是呢
如题,咱用这个函数获取用户名,拿到的变成了奇怪的字串,同一用户每次会话的返回还不一样
log如下 2016-02-11 06:02:58,821 QQLogin.py[line:340] INFO Requesting the account by uin: 1050104160 2016-02-11 06:02:59,473 QQLogin.py[line:346] DEBUG uin_to_account html: {u'retcode': 0, u'result': {u'account': 875585845, u'uin': 1050104160, u'uiuin': u''}}
希望能修复下( 以上。