MiraiForum

    • Register
    • Login
    • Search
    • Popular
    • Recent
    • Unsolved
    • Tags
    • Groups
    • 友情链接

    [mirai-api-http]梗查询插件——GengSearch

    插件发布
    python mirai-api-http
    25
    182
    36458
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Koreyoshi
      Koreyoshi @风流任我 last edited by

      @风流任我 排除一下是不是网络问题?或者把端口换一个

      1 Reply Last reply Reply Quote 0
      • 风
        风流任我 摸鱼 last edited by

        您看,毫无问题,我的端口是8080呀,就是手机上毫无反应
        Version 1.3.2
        running from Windows
        未开启每日发送
        未开启黑名单模式
        查询触发文本:
        ['梗查询 ']
        ['来点梗']
        群冷却时间: 5 秒 文本: 让我休息一下嘛!
        群成员冷却时间: 5 秒 文本: 你搜的太快啦!{}秒后再来试试吧
        {'Key': '1234567890', 'host': 'localhost:8080', 'port': '8080', 'qq': '1474058663', 'session': '1ROdm3Xm'}
        data Get Success
        Listening……
        Get mission
        Searchid: 77532939
        infoUrl: https://jikipedia.com/definition/77532939
        Loading page (1/2)
        Rendering (2/2)
        Done
        Success
        RuningTime: 1.7750666000000024
        save log

        Listening……

        1 Reply Last reply Reply Quote 0
        • 风
          风流任我 摸鱼 last edited by

          我每天换一次cookie这只能解决速度,就是手机上没一点消息,一条都没出来,很多时候都是这样的,它好起来就很好,坏起来就一条都不出来

          Koreyoshi 1 Reply Last reply Reply Quote 0
          • Koreyoshi
            Koreyoshi @风流任我 last edited by

            @风流任我 试试重启一下mirai?这种情况应该不是插件的问题,端口不要8080,改远一点试试

            1 Reply Last reply Reply Quote 0
            • 风
              风流任我 摸鱼 last edited by

              作者大大,请教一下,为啥都配置好了,还是不能连上呀,api-http都配置好了,data文件也填好了,cookie也填好了,显示这个

              1 Reply Last reply Reply Quote 0
              • 风
                风流任我 摸鱼 last edited by

                Version 1.3.2
                running from Windows
                未开启每日发送
                未开启黑名单模式
                查询触发文本:
                ['梗查询 ']
                ['来点梗']
                群冷却时间: 10 秒 文本: 让我休息一下嘛!
                群成员冷却时间: 30 秒 文本: 你搜的太快啦!{}秒后再来试试吧
                1
                data Get Success
                Listening……
                Mirai未运行或未配置mah插件
                错误详情:
                Traceback (most recent call last):
                File "GengSearch.py", line 255, in Listening
                File "simuse.py", line 60, in Fetch_Message
                TypeError: 'int' object is not subscriptable

                save log
                请按任意键继续. . .

                Koreyoshi 1 Reply Last reply Reply Quote 0
                • Koreyoshi
                  Koreyoshi @风流任我 last edited by Koreyoshi

                  @风流任我 这个是没连上api-http,是配置错误了。另外bot不能发出图片不排除被风控的原因

                  1 Reply Last reply Reply Quote 0
                  • JCCER
                    JCCER last edited by

                    大佬,运行不了,这个错误不知道怎么解决
                    Traceback (most recent call last):
                    File "/home/chatbot/geng/GengSearch.py", line 385, in <module>
                    main()
                    File "/home/chatbot/geng/GengSearch.py", line 369, in main
                    seting=GetSeting()
                    File "/home/chatbot/geng/GengSearch.py", line 318, in GetSeting
                    seting=json.loads(seting)
                    File "/usr/lib/python3.9/json/init.py", line 346, in loads
                    return _default_decoder.decode(s)
                    File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
                    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
                    File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
                    raise JSONDecodeError("Expecting value", s, err.value) from None
                    json.decoder.JSONDecodeError: Expecting value: line 2 column 15 (char 16)

                    Koreyoshi 1 Reply Last reply Reply Quote 0
                    • Koreyoshi
                      Koreyoshi @JCCER last edited by

                      @JCCER data.json可能存在有其他字符之类的,只替换双引号里面的值就可以,其他不要动

                      JCCER 1 Reply Last reply Reply Quote 0
                      • L
                        Lithophane last edited by

                        LQHK(S_PA{U`$X0U5GRWBKY.png

                        Koreyoshi 1 Reply Last reply Reply Quote 0
                        • Koreyoshi
                          Koreyoshi @Lithophane last edited by

                          @Lithophane cookie文件的编码不对,保存时用utf-8的编码,而且文件里面不要有换行

                          1 Reply Last reply Reply Quote 1
                          • JCCER
                            JCCER @Koreyoshi last edited by

                            @Koreyoshi 谢谢!解决了,是seting.json有问题,我骚操作把你github里面的seting.json文件说明里的那些都复制过来了

                            1 Reply Last reply Reply Quote 0
                            • H
                              HaMan last edited by

                              佬,为啥运行一段时间后就会自动关闭了,log上没报错啥的

                              Koreyoshi 1 Reply Last reply Reply Quote 0
                              • Koreyoshi
                                Koreyoshi @HaMan last edited by

                                @HaMan 可能是和mirai api的连接断了?

                                1 Reply Last reply Reply Quote 0
                                • C
                                  cold233 last edited by

                                  大佬,我不添加cookie能正常使用,但添加了以后就会出错:

                                  image.png
                                  请问是什么原因呢?

                                  Koreyoshi 1 Reply Last reply Reply Quote 0
                                  • Koreyoshi
                                    Koreyoshi @cold233 last edited by

                                    @cold233 可能是cookie不对?注意不要有换行和空格什么的

                                    1 Reply Last reply Reply Quote 0
                                    • C
                                      cold233 last edited by

                                      因为看了前面的帖子,所以已经检查过了,所有换行和空格都删掉了……还试着加减了单引号,但都不行

                                      Koreyoshi 1 Reply Last reply Reply Quote 0
                                      • Koreyoshi
                                        Koreyoshi @cold233 last edited by

                                        @cold233 要不加我qq,我看看cookie文件有没有什么问题
                                        1121917292

                                        1 Reply Last reply Reply Quote 0
                                        • C
                                          cold233 last edited by

                                          已经加了,大佬通过一下

                                          1 Reply Last reply Reply Quote 0
                                          • K
                                            kott last edited by

                                            想请问一下项目在我重启机器人后好像没法通过之前发的nohup指令自动启动了,运行是没问题,就是需要我每天手动启动,不知道是什么问题,有空的话可以帮忙看看,谢谢
                                            During handling of the above exception, another exception occurred:

                                            Traceback (most recent call last):
                                            File "/www/gengSearch/GengSearch.Linux/GengSearch.py", line 233, in Listening
                                            message=simuse.Fetch_Message(data)
                                            File "/www/gengSearch/GengSearch.Linux/simuse.py", line 63, in Fetch_Message
                                            res=r.request('get',url)
                                            File "/www/gengSearch/GengSearch.Linux/requests/api.py", line 61, in request
                                            return session.request(method=method, url=url, **kwargs)
                                            File "/www/gengSearch/GengSearch.Linux/requests/sessions.py", line 542, in request
                                            resp = self.send(prep, **send_kwargs)
                                            File "/www/gengSearch/GengSearch.Linux/requests/sessions.py", line 655, in send
                                            r = adapter.send(request, **kwargs)
                                            File "/www/gengSearch/GengSearch.Linux/requests/adapters.py", line 516, in send
                                            raise ConnectionError(e, request=request)
                                            requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=9023): Max retries exceeded with url: /fetchMessage?sessionKey=vbAs37re&count=10 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7ffbbebaf490>: Failed to establish a new connection: [Errno 111] Connection refused'))

                                            save log
                                            Traceback (most recent call last):
                                            File "/www/gengSearch/GengSearch.Linux/GengSearch.py", line 385, in <module>
                                            main()
                                            File "/www/gengSearch/GengSearch.Linux/GengSearch.py", line 381, in main
                                            GengSearch(data,seting,plat)
                                            File "/www/gengSearch/GengSearch.Linux/GengSearch.py", line 305, in GengSearch
                                            SearchList=Listening(data,seting)
                                            File "/www/gengSearch/GengSearch.Linux/GengSearch.py", line 240, in Listening
                                            if type(message)==type(0):
                                            UnboundLocalError: local variable 'message' referenced before assignment

                                            Koreyoshi 1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 6
                                            • 7
                                            • 8
                                            • 9
                                            • 10
                                            • 8 / 10
                                            • First post
                                              Last post
                                            Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact