美文网首页
2020-02-27 ITCHAT search_chatro

2020-02-27 ITCHAT search_chatro

作者: netppp | 来源:发表于2020-02-27 21:37 被阅读0次

    使用 user_info = itchat.search_chatrooms(name='XXX') 查找群的时候,有时会遇到找不到的情况,需要在群设置选择-保存到通讯录,才能被查找到

        user_info = itchat.search_chatrooms(name='XXX')

        if len(user_info)==0:

          print(u'没有找到群')

        else:

          print(user_info)

          chatroomname=user_info[0]['UserName']

          print(user_info[0]['UserName'])

          itchat.send_msg("ceshi",chatroomname)

    作者:德徳_597b

    链接:https://www.jianshu.com/p/c8b164b840db

    来源:简书

    著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

    相关文章

      网友评论

          本文标题:2020-02-27 ITCHAT search_chatro

          本文链接:https://www.haomeiwen.com/subject/gxefhhtx.html