Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

获取不到群成员的qq号 #231

Open
winrey opened this issue May 19, 2018 · 4 comments
Open

获取不到群成员的qq号 #231

winrey opened this issue May 19, 2018 · 4 comments
Labels

Comments

@winrey
Copy link

winrey commented May 19, 2018

环境是docker-compose直接拉取hub镜像部署的。刚去看了镜像17天前还更新过,应该能排除是没更新的问题。
使用的是md5密码登陆的方式,扫码过程中没有任何报错。

接口{{host}}/openqq/get_group_info返回是这样的:

[
    {
        "code": 120555xxx,
        "createtime": 1468635xxx,
        "id": 1375660xxx,
        "level": 0,
        "markname": null,
        "member": [
            {
                "card": "吃瓜群众",
                "city": "海淀",
                "client_type": "unknown",
                "country": "中国",
                "id": 3207438xxx,
                "name": "Renne.",
                "province": "北京",
                "sex": "female",
                "state": "offline"
            }
        ],
        "memo": "群简介",
        "name": "群名",
        "owner_id": 2881432xxx,
        "owner_uid": 469762xxx,
        "role": "attend",
        "uid": 454710xxx
    }
]

群成员中没有Uid的项目。

猜测正是因此,receiver_uid 没有缓存的值,获取群消息后值返回为空

{
    'class': 'recv',
    'content': '。',
    'group': '测试',
    'group_id': 289936xxxx,
    'group_uid': 60924xxxx,
    'id': 64529,
    'post_type': 'receive_message',
    'receiver': 'test',
    'receiver_id': 23799xxxx,
    'receiver_uid': None,
    'sender': '我',
    'sender_id': 16xxxxxxxx,
    'sender_uid': None,
    'time': 1526738315,
    'type': 'group_message'
}
@winrey
Copy link
Author

winrey commented May 19, 2018

我去截包看了下官方qun.qq.com的接口
qun.qq.com使用的接口是:
POST https://qun.qq.com/cgi-bin/qun_mgr/search_group_members
gc=群号&st=0&end=20&sort=0&bkn=csrf_token
Cookies暂略
返回的数据大概是这样:

{
    "adm_max": 20,
    "adm_num": 9,
    "count": 881,
    "ec": 0,
    "levelname": {},
    "max_count": 2000,
    "mems": [{
            "card": "",
            "flag": 0,
            "g": 255,
            "join_time": 1445063165,
            "last_speak_time": 1526736663,
            "lv": {
                "level": 6,
                "point": 3341
            },
            "nick": "昵称",
            "qage": 13,
            "role": 0,
            "tags": "-1",
            "uin": QQ号
        }
    ],
    "search_count": 881,
    "svr_time": 1526745821,
    "vecsize": 5
}

不过在翻history的时候,好像原先使用的是这种方式,后来似乎是因为什么原因更换了成了http://qinfo.clt.qq.com/member.html这个接口?是不是这个功能被删除了?

不知道能不能帮上忙_(:з)∠)_

@winrey
Copy link
Author

winrey commented May 19, 2018

https://github.com/sjdy521/Mojo-Webqq/blob/6c1a9555cbb0795b76e0d346a7770c7f7aee83b9/lib/Mojo/Webqq/Model/Remote/_get_group_info_ext.pm#L63
我试了试这个接口,Cookie照抄了qun.qq.com里的,返回了一个404,不知道是我参数的问题还是腾讯的问题

<html>
    <head>
        <title>404 Not Found</title>
    </head>
    <body bgcolor="white">
        <center>
            <h1>404 Not Found</h1>
        </center>
        <hr>
        <center>nginx</center>
    </body>
</html>

image

@hexsum
Copy link
Owner

hexsum commented Jun 1, 2018

@remini1998 非常抱歉,这么晚才看到你的issue,这个可能是目前存在的一个bug

试试先通过/openqq/get_group_info或者 /openqq/get_group_basic_info 来获取群号码

然后再通过 /openqq/search_group来获取指定群号码对应的群成员信息

这样的方式应该可以获取到群成员的uid

也可以加群讨论比较方便,官方QQ群: 498880156

@winrey
Copy link
Author

winrey commented Jun 1, 2018

@sjdy521 十分感谢。
辛苦啦

@hexsum hexsum added the bug label Jun 13, 2018
@hexsum hexsum closed this as completed Jun 15, 2018
@hexsum hexsum reopened this Jun 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants