Quan666 / ELF_RSS

QQ机器人 RSS订阅 插件,订阅源建议选择 RSSHub
https://myelf.club/archives/221
GNU General Public License v3.0
553 stars 56 forks source link

[zhenxun bot]配置文件及代理相关的问题 #324

Closed ILYSHL closed 2 years ago

ILYSHL commented 2 years ago

不好意思,群里没人答,问的问题被刷上去了。 想想还是交issue···

环境:Windows Server 2019;Python3.9.12;

如果不复制项目中.env.dev文件内容到工程目录下的.env.prod时插件是正常工作的。 RPJKYNKR$)0_IHWR6}EBO2H

但是等到发送订阅内容时有错误 发送内容如下: 【Twitter @BlueArchive】更新了!

[Hot Springs Resort No. 227 Daily Log Management Guide]

Please help Nodoka run the Hot Springs Resort No. 227, Sensei! Spend Event Points to manage the resort and earn various rewards including Relationship Points and Elephs!

Details:

BlueArchive  https://nexon.link/8Sq

翻译失败!HTTPSConnectionPool(host='translate.google.com', port=443): Max retries exceeded with url: /m?tl=zh-CN&sl=auto&q=%5C%5BHot%5C+Springs%5C+Resort%5C+No%5C.%5C+227%5C+Daily%5C+Log%5C+Management%5C+Guide%5C%5D%5C%0A%5C%0APlease%5C+help%5C+Nodoka%5C+run%5C+the%5C+Hot%5C+Springs%5C+Resort%5C+No%5C.%5C+227%2C%5C+Sensei%21%5C%0ASpend%5C+Event%5C+Points%5C+to%5C+manage%5C+the%5C+resort%5C+and%5C+earn%5C+various%5C+rewards%5C+including%5C+Relationship%5C+Points%5C+and%5C+Elephs%21%5C%0A%5C%0A%5C+Details%3A%5C+%5C%0A%5C%0A%5C%23BlueArchive%E2%80%82%5C+https%3A%2F%2Fnexon%5C.link%2F8Sq (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)')))

图片走丢啦: https://pbs.twimg.com/media/FXbsx9mVsAAS0av?format=jpg&name=orig

图片走丢啦: https://pbs.twimg.com/media/FXbszZTUIAAWnGU?format=jpg&name=orig

链接:https://twitter.com/EN_BlueArchive/status/1547506189579190273 日期:2022年07月14日 17:00:01

如果复制项目中.env.dev文件内容到工程目录下的.env.prod后则无法启动 VVV47UIKP(57 $G6CV26K~W

整了一个下午了,还希望大佬教一下。

Quan666 commented 2 years ago

应该是你代理配置问题 或者你订阅的代理属性没开

NekoAria commented 2 years ago

说实话,我更推荐发 issue 而不是在群里问,因为群里水群的太多了,得不到回答很正常(

我看你似乎是在 zhenxun bot 上跑的 ELF_RSS ,而他读取的配置文件是 .env.dev ,所以你要使 ELF_RSS 的配置起作用,应该也放到 .env.dev 文件里。

Quan666 commented 2 years ago

说实话,我更推荐发 issue 而不是在群里问,因为群里水群的太多了,得不到回答很正常(

我看你似乎是在 zhenxun bot 上跑的 ELF_RSS ,而他读取的配置文件是 .env.dev ,所以你要使 ELF_RSS 的配置起作用,应该也放到 .env.dev 文件里。

我也推荐 issue,这样其他人也能看到

ILYSHL commented 2 years ago

感谢大佬,不知道为什么就能用了··· 我直接改config了,我也摸不着头脑··· 等等我去试试把配置复制到.env.dev去 总之现在好像没什么问题了。 顺带提一嘴,Rsshub.app的更新是不是慢很多啊。几个小时都跟不上。。。 用国内的rsshub还会好一点 所以我想能不能备用的rsshub也检查更新,其中一个检测到更新就推送呢。

再次谢谢大佬

NekoAria commented 2 years ago

感谢大佬,不知道为什么就能用了··· 我直接改config了,我也摸不着头脑··· 等等我去试试把配置复制到.env.dev去 总之现在好像没什么问题了。 顺带提一嘴,Rsshub.app的更新是不是慢很多啊。几个小时都跟不上。。。 用国内的rsshub还会好一点 所以我想能不能备用的rsshub也检查更新,其中一个检测到更新就推送呢。

再次谢谢大佬

呃,直接改 config.py 肯定能用啊,但是你后续升级还要继续改吗? 改配置文件才是正确的做法。 你直接调换备用和官方 rsshub 的关系不就行了,官方作为备用。

NekoAria commented 2 years ago

呃,还有什么问题吗?

ILYSHL commented 2 years ago

应该没问题吧,可是还是连不上。。 image Clash的端口是7890了,配置文件也写了。 不知道为什么抓取不到···

NekoAria commented 2 years ago

抓取不到是指日志里警告"抓取失败"吗? 另外推荐你 RSSHub 官方源作为备用而不是主节点。

ILYSHL commented 2 years ago

没什么问题了,就剩个图片加载不出来 XPC__228{A5 Y41W2J9 GYN

NekoAria commented 2 years ago

是这条推被删了吧。。所以图片自然也没了。

ILYSHL commented 2 years ago

没有啊,这是我自己发的。。发完我删了重新发还是不行

ILYSHL commented 2 years ago

image

NekoAria commented 2 years ago

对这个订阅设置 proxy=1 了吗?

ILYSHL commented 2 years ago

没有,要是设置proxy=1就直接抓不到了

ILYSHL commented 2 years ago

image

NekoAria commented 2 years ago

呃,看样子没报错,直接抓取失败

ILYSHL commented 2 years ago

image

ILYSHL commented 2 years ago

image

NekoAria commented 2 years ago

你修改下 rss_parsing.py 里的 get_rss ,把两处 except Exception: 改成 except Exception as e: ,然后换行加上 logger.exception(e) ,再重启机器人看看日志。

NekoAria commented 2 years ago

最终结论:aiohttp 在 3.7.0 等较早版本及 Windows 平台环境下,使用代理会报错。