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

e站搜索失效 #11

Open
WindFlarer opened this issue Nov 15, 2021 · 9 comments
Open

e站搜索失效 #11

WindFlarer opened this issue Nov 15, 2021 · 9 comments
Labels
bug? possible bug help wanted Extra attention is needed need investigation need investigation proxy

Comments

@WindFlarer
Copy link

手动能搜到,但是bot搜索不到
给出env的设置,希望能帮忙康康

HOST=127.0.0.1
PORT=8073
SECRET=
ACCESS_TOKEN=
COMMAND_START=["/",""]
COMMAND_SEP=["."]
NICKNAME=["awesome", "bot"]
APSCHEDULER_AUTOSTART=true
APSCHEDULER_CONFIG={"apscheduler.timezone": "Asia/Shanghai"}

EX_COOKIE='"domain": ".e-hentai.org", "expiry": 1668497998, "httpOnly": false, "name": "sk", "path": "/", "secure": false, "value": "54azub075xa1furqmeh6hn67qzb9"}, {"domain": ".e-hentai.org", "httpOnly": false, "name": "ipb_session_id", "path": "/", "secure": false, "value": "c02cfd65f53eb2a0fecc2e292bd2be37"}, {"domain": ".e-hentai.org", "expiry": 1668497996, "httpOnly": false, "name": "ipb_pass_hash", "path": "/", "secure": false, "value": "702680826f91a819da80b61be152e9d7"}, {"domain": ".e-hentai.org", "expiry": 1668497996, "httpOnly": false, "name": "ipb_member_id", "path": "/", "secure": false, "value": "5778116"'
PROXY=http://127.0.0.1:7890 # type: str e.g. PROXY=http://127.0.0.1:8889
SEARCH_LIMIT=2 # 搜索限制 防刷屏
RISK_CONTROL=true # 风控模式 启动后会使用合并转发 只有gocq有实现

@WindFlarer
Copy link
Author

可能是cookie的问题,修改cookie为
image
之后运行程序发现报错
image

@WindFlarer
Copy link
Author

完整的traceback
11-15 17:48:32 [ERROR] nonebot | Running matcher <Matcher from nonebot_plugin_picsearcher, type=message, priority=0, temp=True> failed.
Traceback (most recent call last):
File "C:\Users\Accepted\Desktop\python\QQ机器人4\windflare\bot.py", line 44, in
nonebot.run(app="mp_main:app")
File "C:\Users\Accepted\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot_init_.py", line 278, in run
get_driver().run(host, port, *args, **kwargs)
File "C:\Users\Accepted\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\drivers\fastapi.py", line 256, in run
uvicorn.run(
File "C:\Users\Accepted\AppData\Local\Programs\Python\Python39\lib\site-packages\uvicorn\main.py", line 447, in run
server.run()
File "C:\Users\Accepted\AppData\Local\Programs\Python\Python39\lib\site-packages\uvicorn\server.py", line 68, in run
return asyncio.run(self.serve(sockets=sockets))
File "C:\Users\Accepted\AppData\Local\Programs\Python\Python39\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\Accepted\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 629, in run_until_complete
self.run_forever()
File "C:\Users\Accepted\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 596, in run_forever
self._run_once()
File "C:\Users\Accepted\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1890, in _run_once
handle._run()
File "C:\Users\Accepted\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\Accepted\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\message.py", line 128, in _check_matcher
await _run_matcher(Matcher, bot, event, state)

File "C:\Users\Accepted\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\message.py", line 156, in run_matcher
await matcher.run(bot, event, state)
File "C:\Users\Accepted\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\matcher.py", line 597, in run
await handler(self, bot, event, self.state)
File "C:\Users\Accepted\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\handler.py", line 64, in call
await self.func(
File "C:\Users\Accepted\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\matcher.py", line 458, in wrapper
await func_handler(matcher, bot, event, state)
File "C:\Users\Accepted\AppData\Local\Programs\Python\Python39\lib\site-packages\nonebot\handler.py", line 64, in call
await self.func(
File "C:\Users\Accepted\Desktop\python\QQ机器人4\windflare\nonebot_plugin_picsearcher_init
.py", line 81, in get_setu
async for msg in limiter(get_des(url, mod), bot.config.search_limit or 2):
File "C:\Users\Accepted\Desktop\python\QQ机器人4\windflare\nonebot_plugin_picsearcher\utils.py", line 9, in limiter
yield await gen.asend(None)
File "C:\Users\Accepted\Desktop\python\QQ机器人4\windflare\nonebot_plugin_picsearcher_init_.py", line 34, in get_des
async for msg in get_des_ex(url):
File "C:\Users\Accepted\Desktop\python\QQ机器人4\windflare\nonebot_plugin_picsearcher\ex.py", line 99, in get_des
image_data: List[Tuple] = await get_pic_from_url(url)
File "C:\Users\Accepted\Desktop\python\QQ机器人4\windflare\nonebot_plugin_picsearcher\ex.py", line 75, in get_pic_from_url
return [i for i in parse_html(html)]
File "C:\Users\Accepted\Desktop\python\QQ机器人4\windflare\nonebot_plugin_picsearcher\ex.py", line 75, in
return [i for i in parse_html(html)]
File "C:\Users\Accepted\Desktop\python\QQ机器人4\windflare\nonebot_plugin_picsearcher\ex.py", line 50, in parse_html
selector = fromstring(html)
File "C:\Users\Accepted\AppData\Local\Programs\Python\Python39\lib\site-packages\lxml\html_init_.py", line 875, in fromstring
doc = document_fromstring(html, parser=parser, base_url=base_url, **kw)
File "C:\Users\Accepted\AppData\Local\Programs\Python\Python39\lib\site-packages\lxml\html_init_.py", line 763, in document_fromstring
raise etree.ParserError(
lxml.etree.ParserError: Document is empty

@synodriver
Copy link
Owner

注意:eh和ex的cookie不一样,确定这个cookie是ex里站的?表站可以不用cookie

@synodriver synodriver added the bug? possible bug label Nov 15, 2021
@WindFlarer
Copy link
Author

WindFlarer commented Nov 15, 2021 via email

@WindFlarer
Copy link
Author

WindFlarer commented Nov 15, 2021 via email

@synodriver
Copy link
Owner

那就奇怪了,因为我正在用(有待研究

其他的源头正常吗?

@WindFlarer
Copy link
Author

WindFlarer commented Nov 15, 2021 via email

@synodriver
Copy link
Owner

有空我抽成一个单独的restapi(

@WindFlarer
Copy link
Author

WindFlarer commented Nov 17, 2021 via email

@synodriver synodriver added help wanted Extra attention is needed need investigation need investigation labels Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug? possible bug help wanted Extra attention is needed need investigation need investigation proxy
Projects
None yet
Development

No branches or pull requests

2 participants