[mirai-api-http]梗查询插件——GengSearch
-
windows版本 接收到关键词后出现如下错误
Date:2022-02-23 17:13:22
SenderGroup:无法定位到搜索列表的首个词条ID
SenderID:Traceback (most recent call last):
File "GengSearch.py", line 154, in Search
UnboundLocalError: local variable 'Searchlist' referenced before assignmentSearchUrl:Error
InfoUrl:Error
RuningTime:0 S -
@Black-Spree 网络问题 已解决
-
@Black-Spree 好的
-
在linux系统安装插件里遇到了一些问题。可以请教一下嘛 QQ2076518661
-
['梗查询 ']
['来点梗']
群冷却时间: 10 秒 文本: 让我休息一下嘛!
群成员冷却时间: 30 秒 文本: 你搜的太快啦!{}秒后再来试试吧
{'Key': '1287663323', 'host': '127.0.0.1:8080', 'port': '8080', 'qq': '703382890', 'session': 'atb1cSIk'}
data Get Success
Listening……
Get mission
搜索请求错误/超时
错误详情:
Traceback (most recent call last):
File "GengSearch.py", line 138, in Search
File "requests\api.py", line 75, in get
File "requests\api.py", line 61, in request
File "requests\sessions.py", line 542, in request
File "requests\sessions.py", line 655, in send
File "requests\adapters.py", line 439, in send
File "urllib3\connectionpool.py", line 699, in urlopen
File "urllib3\connectionpool.py", line 394, in _make_request
File "urllib3\connection.py", line 239, in request
File "http\client.py", line 1257, in request
File "http\client.py", line 1298, in _send_request
File "urllib3\connection.py", line 224, in putheader
File "http\client.py", line 1230, in putheader
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 261-262: ordinal not in range(256)save log
搜索列表保存错误
错误详情:
Traceback (most recent call last):
File "GengSearch.py", line 148, in Search
UnboundLocalError: local variable 'Searchlist' referenced before assignmentsave log
无法定位到搜索列表的首个词条ID
错误详情:
Traceback (most recent call last):
File "GengSearch.py", line 154, in Search
UnboundLocalError: local variable 'Searchlist' referenced before assignmentsave log
Error
错误详情:
Traceback (most recent call last):
File "GengSearch.py", line 166, in Search
UnboundLocalError: local variable 'Searchlist' referenced before assignmentsave log
save logListening……
-
@死亡程序员 cookie有没有填写正确,注意不要有换行
-
不是用开发者模式抓包,复制cookie值吗?
-
@死亡程序员 不需要抓包,按照我文档写的就行
-
报错
搜索请求错误/超时
错误详情:
Traceback (most recent call last):
File "GengSearch.py", line 121, in Search
Searchlist=requests.get(SearchUrl,cookies=cookie)
File "/root/GengSearch/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/root/GengSearch/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/root/GengSearch/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/root/GengSearch/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/root/GengSearch/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 354, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib64/python3.6/http/client.py", line 1269, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib64/python3.6/http/client.py", line 1310, in _send_request
self.putheader(hdr, value)
File "/usr/lib64/python3.6/http/client.py", line 1242, in putheader
values[i] = one_value.encode('latin-1')
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 272-273: ordinal not in range(256)搜索列表保存错误
错误详情:
Traceback (most recent call last):
File "GengSearch.py", line 129, in Search
Searchhtmlfile.write(Searchlist)
UnboundLocalError: local variable 'Searchlist' referenced before assignmentsave log
无法定位到搜索列表的首个词条ID
错误详情:
Traceback (most recent call last):
File "GengSearch.py", line 135, in Search
idnum=Searchlist.find('div data-id=')
UnboundLocalError: local variable 'Searchlist' referenced before assignmentsave log
Error
错误详情:
Traceback (most recent call last):
File "GengSearch.py", line 147, in Search
Searchid=Searchlist[idnum1:idnum2]
UnboundLocalError: local variable 'Searchlist' referenced before assignmentsave log
-
@MJR147 看看是不是cookie设置错误了
-
@Koreyoshi 按照文档获取的Cookie,还是报错
-
@MJR147 可能会有空格或者换行之类的,记得不要有换行
-
@Koreyoshi 没有换行,有空格,需要删去吗?
-
@MJR147 嗯,删除尝试一下
-
@Koreyoshi 似乎并没有什么用
-
@MJR147 加下我qq?我看一下 1121917292
-
@Koreyoshi 嗯,加了
-
@Koreyoshi 根本无法复制完整,输入后显示的cookie后有省略号,复制下来虽然长了些,但后面仍然有省略号
-
@2741911624 用chrome浏览器试试,输入完后记得回车,会展示完整的cookie
-
@Koreyoshi 感谢,我原来是没有回车