Quan666 / ELF_RSS

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

访问失败 #442

Closed a930389426 closed 1 year ago

a930389426 commented 1 year ago

ELF_RSS 、 go-cqhttp 、 nonebot 、 Python 版本及操作系统

ELF_RSS:"2.6.19"

go-cqhttp:"v1.0.1"

NONEBOT2:"2.0.0rc2"

Python:“3.9”

操作系统:“WIN10”

列出安装的 Python 包

aiofiles==0.8.0 aiohttp==3.7.4.post0 aiosqlite==0.17.0 anyio==3.6.2 APScheduler==3.9.1.post1 arrow==1.2.3 async-timeout==3.0.1 asyncpg==0.27.0 attrs==22.2.0 bbcode==1.1.0 beautifulsoup4==4.9.3 bilireq==0.2.3.post0 black==22.12.0 cachetools==5.2.0 cattrs==22.2.0 certifi==2022.12.7 chardet==4.0.0 charset-normalizer==3.1.0 click==8.1.3 cn2an==0.5.19 colorama==0.4.6 commonmark==0.9.1 contourpy==1.0.6 cssselect==1.2.0 cycler==0.11.0 dateparser==1.1.4 deep-translator==1.11.1 ecdsa==0.18.0 emoji==1.7.0 exceptiongroup==1.1.0 fastapi==0.97.0 feedparser==6.0.10 ffmpeg==1.4 filetype==1.2.0 fonttools==4.38.0 greenlet==2.0.1 grpcio==1.51.1 h11==0.12.0 httpcore==0.14.7 httptools==0.5.0 httpx==0.22.0 idna==3.4 ImageHash==4.3.1 importlib-metadata==5.2.0 iso8601==1.1.0 jieba==0.42.1 Jinja2==3.1.2 kiwisolver==1.4.4 loguru==0.6.0 lxml==4.6.5 magneturi==1.3 Markdown==3.4.1 MarkupSafe==2.1.1 matplotlib==3.6.2 meme-generator==0.0.11 msgpack==1.0.4 multidict==6.0.3 mypy-extensions==0.4.3 nonebot-adapter-onebot==2.2.0 nonebot-plugin-apscheduler==0.2.0 nonebot-plugin-guild-patch==0.2.3 nonebot-plugin-htmlrender==0.2.0.1 nonebot-plugin-imageutils==0.1.17 nonebot-plugin-localstore==0.4.1 nonebot2==2.0.0rc2 numpy==1.24.0 opencv-python==4.6.0.66 opencv-python-headless==4.7.0.72 packaging==22.0 pathspec==0.10.3 pikpakapi==0.1.1 pil-utils==0.1.7 Pillow==9.3.0 platformdirs==2.6.0 playwright==1.29.0 proces==0.1.3 protobuf==4.21.12 psutil==5.9.4 pyasn1==0.4.8 pydantic==1.10.9 pyee==9.0.4 Pygments==2.13.0 pygtrie==2.5.0 pymdown-extensions==9.9 pyparsing==3.0.9 pypika-tortoise==0.1.6 pypinyin==0.46.0 pyquery==2.0.0 python-dateutil==2.8.2 python-dotenv==0.21.0 python-jose==3.3.0 python-markdown-math==0.8 python-multipart==0.0.5 python-qbittorrent==0.4.3 pytz==2022.7 pytz-deprecation-shim==0.1.0.post0 PyWavelets==1.4.1 PyYAML==5.4.1 qbittorrent==0.1.6 regex==2022.10.31 requests==2.31.0 retrying==1.3.4 rfc3986==1.5.0 rich==12.6.0 rsa==4.9 ruamel.yaml==0.17.21 ruamel.yaml.clib==0.2.7 scipy==1.9.3 setuptools-scm==7.1.0 sgmllib3k==1.0.0 six==1.16.0 sniffio==1.3.0 soupsieve==2.3.2.post1 starlette==0.27.0 tenacity==8.2.2 tinydb==4.8.0 toml==0.10.2 tomli==2.0.1 tomlkit==0.11.6 tortoise-orm==0.19.3 tqdm==4.65.0 typing_extensions==4.4.0 tzdata==2022.7 tzlocal==4.2 ujson==5.6.0 urllib3==2.0.3 uvicorn==0.22.0 watchfiles==0.18.1 websockets==10.4 win32-setctime==1.1.0 wordcloud==1.8.2.2 yarl==1.8.2 zipp==3.11.0

如何复现

稳定复现,就单纯的获取失败

期望行为

希望能正常抓取

实际行为

X PVH_RLN0I1R2X13FYW}JR ($E64ONT)``9JD`S}O`V@X4 image image 我代理填写了,地址放浏览器里也是能正常访问的,但就是访问失败,不知道哪里出了问题

NekoAria commented 1 year ago

呃呃,你直接修改过 config.py 文件? 你的 rsshub 地址后面多了一个 / ,导致地址不对了。

你应该复制 .env.dev.env.prod ,然后再修改配置,而不是直接修改 config.py

a930389426 commented 1 year ago

呃呃,你直接修改过 config.py 文件? 你的 rsshub 地址后面多了一个 / ,导致地址不对了。

这个"/"我是特意加的,因为没加之前我也访问不了

a930389426 commented 1 year ago

image

NekoAria commented 1 year ago

呃呃,你直接修改过 config.py 文件? 你的 rsshub 地址后面多了一个 / ,导致地址不对了。

这个"/"我是特意加的,因为没加之前我也访问不了

你浏览器打开的地址不也没加 / ,是 https://rsshub.app/twitter/user/PSO2NGS_JP ,不是 https://rsshub.app//twitter/user/PSO2NGS_JP

a930389426 commented 1 year ago

呃呃,你直接修改过 config.py 文件? 你的 rsshub 地址后面多了一个 / ,导致地址不对了。

这个"/"我是特意加的,因为没加之前我也访问不了

你浏览器打开的地址不也没加 / ,是 https://rsshub.app/twitter/user/PSO2NGS_JP ,不是 https://rsshub.app//twitter/user/PSO2NGS_JP

浏览器那个我是在之前我加了“/”之前截的图,当时我还没发issue,然后把“/”加上之后还是不行,最后才发了issue

a930389426 commented 1 year ago

image

就你看我这个截图,我把“/”去掉了一样是访问失败的,我已经做过排列组合了,RSS地址后面加不加“/”,订阅的地址前面加不加“/”我都试过了,实在不行我才发的issue

NekoAria commented 1 year ago

https://github.com/Quan666/ELF_RSS/blob/2.0/src/plugins/ELF_RSS2/rss_parsing.py#L185-L190

这里你直接修改成:

except Exception as e:
...
    else:
        logger.error(f"E: {repr(e)}\n[{rss_url}]访问失败!")

然后再试试,看看报错信息。

a930389426 commented 1 year ago

https://github.com/Quan666/ELF_RSS/blob/2.0/src/plugins/ELF_RSS2/rss_parsing.py#L185-L190

这里你直接修改成:

except Exception as e:
...
    else:
        logger.error(f"E: {repr(e)}\n[{rss_url}]访问失败!")

然后再试试,看看报错信息。

我试试

a930389426 commented 1 year ago

image

NekoAria commented 1 year ago

你这些依赖也太久没更新了吧,尤其是 aiohttp ,旧版本在 Windows 上有奇奇怪怪的问题。

最好按照 requirements.txt 全部更新一下,然后再试试。

a930389426 commented 1 year ago

你这些依赖也太久没更新了吧,尤其是 aiohttp ,旧版本在 Windows 上有奇奇怪怪的问题。

最好按照 requirements.txt 全部更新一下,然后再试试。

好的,我明天试试,谢谢

a930389426 commented 1 year ago

更新依赖后解决了