Closed Nenot233 closed 1 year ago
https://github.com/LambdaYH/zhenxun_plugin_weibo/commit/2a6705f2193ecc1ee57b5def30df78256dbc63a1 这似乎是把该用户评论的微博当作他自己发的微博推送出来了,简单修了下 还没怎么测试过,先开着这个issue
还是会遇到这个情况
似乎是因为评论(转发?)
自己转发的不会推送,类似上面这个情况就会推送原微博
01-30 17:22:57 [ERROR] zhenxun_plugin_weibo | 'NoneType' object is not subscriptable
Traceback (most recent call last):
File "D:\BOT\zhenxun_bot\bot.py", line 22, in
File "D:\BOT\zhenxun_bot\extensive_plugin\zhenxun_plugin_weibo\weibo_spider.py", line 334, in get_one_weibo retweet = self.parse_weibo(retweeted_status) File "D:\BOT\zhenxun_bot\extensive_plugin\zhenxun_plugin_weibo\weibo_spider.py", line 276, in parse_weibo weibo["screen_name"] = weibo_info["user"]["screen_name"] TypeError: 'NoneType' object is not subscriptable 01-30 17:22:57 [ERROR] zhenxun_plugin_weibo | 'NoneType' object is not subscriptable Traceback (most recent call last): File "D:\BOT\zhenxun_bot\bot.py", line 22, in
nonebot.run() File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-l9AehN_x-py3.9\lib\site-packages\nonebot__init__.py", line 273, in run get_driver().run(*args, kwargs) File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-l9AehN_x-py3.9\lib\site-packages\nonebot\drivers\fastapi.py", line 172, in run uvicorn.run( File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-l9AehN_x-py3.9\lib\site-packages\uvicorn\main.py", line 569, in run server.run() File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-l9AehN_x-py3.9\lib\site-packages\uvicorn\server.py", line 60, in run return asyncio.run(self.serve(sockets=sockets)) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 634, in run_until_complete self.run_forever() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\windows_events.py", line 321, in run_forever super().run_forever() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 601, in run_forever self._run_once() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1905, in _run_once handle._run() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 80, in _run self._context.run(self._callback, self._args) File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-l9AehN_x-py3.9\lib\site-packages\apscheduler\executors\base_py3.py", line 30, in run_coroutine_job retval = await job.func(job.args, job.kwargs) File "D:\BOT\zhenxun_bot\extensive_plugin\zhenxun_pluginweibo__init__.py", line 236, in latest_weibos = await spider.get_latest_weibos() File "D:\BOT\zhenxun_bot\extensive_plugin\zhenxun_plugin_weibo\weibo_spider.py", line 362, in get_latest_weibos wb = await self.get_one_weibo(w) File "D:\BOT\zhenxun_bot\extensive_plugin\zhenxun_plugin_weibo\weibo_spider.py", line 334, in get_one_weibo retweet = self.parse_weibo(retweeted_status) File "D:\BOT\zhenxun_bot\extensive_plugin\zhenxun_plugin_weibo\weibo_spider.py", line 276, in parse_weibo weibo["screen_name"] = weibo_info["user"]["screen_name"] TypeError: 'NoneType' object is not subscriptable
我会冒出这段报错,有问题吗?
yaml文件配置 weibo-banyisheng: desciption: 阿板微博推送 enable_on_default: False format: 0 users:
实际效果 实际情况