synodriver / nonebot_plugin_picsearcher

pic search plugin for nonebot2
GNU General Public License v3.0
110 stars 16 forks source link

e站搜索失效 #11

Open WindFlarer opened 2 years ago

WindFlarer commented 2 years ago

手动能搜到,但是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 commented 2 years ago

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

WindFlarer commented 2 years ago

完整的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 commented 2 years ago

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

WindFlarer commented 2 years ago

是ex的cookie

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2021年11月15日(星期一) 晚上6:39 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [synodriver/nonebot_plugin_picsearcher] e站搜索失效 (Issue #11)

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

WindFlarer commented 2 years ago

应该是这个吧

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2021年11月15日(星期一) 晚上6:39 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [synodriver/nonebot_plugin_picsearcher] e站搜索失效 (Issue #11)

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

synodriver commented 2 years ago

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

其他的源头正常吗?

WindFlarer commented 2 years ago

nao 和 iqdb是正常的

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2021年11月15日(星期一) 晚上6:59 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [synodriver/nonebot_plugin_picsearcher] e站搜索失效 (Issue #11)

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

其他的源头正常吗?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

synodriver commented 2 years ago

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

WindFlarer commented 2 years ago

好的蟹蟹

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2021年11月17日(星期三) 晚上7:37 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [synodriver/nonebot_plugin_picsearcher] e站搜索失效 (Issue #11)

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.