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

rss_class 返回的地址中包含双斜杠 #527

Closed
baka23 opened this issue Aug 31, 2024 · 7 comments
Closed

rss_class 返回的地址中包含双斜杠 #527

baka23 opened this issue Aug 31, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@baka23
Copy link

baka23 commented Aug 31, 2024

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

elf-rss 2.6.23
nonebot2 2.3.2
python 3.12.3
linux 6.6.38

列出安装的 Python 包

No response

如何复现

正常部署rsshub,nonebot和elf-rss就会遇到

期望行为

返回的地址中不含双斜杠

urllib.parse 的 urljoin 函数可以正常处理拼接地址时双斜杠的问题

实际行为

Screenshot_20240831-175534
Screenshot_20240831-175639

@baka23 baka23 added the bug Something isn't working label Aug 31, 2024
@Quan666
Copy link
Owner

Quan666 commented Aug 31, 2024

你添加订阅的命令呢

@baka23
Copy link
Author

baka23 commented Aug 31, 2024

/add bilistat_sqd bilibili/user/dynamic/38882086/disableEmbed=true

我还有哪些遗漏的部分

@baka23
Copy link
Author

baka23 commented Aug 31, 2024

补充一些信息
有可能是 pydantic 导致的问题

pydantic-2.8.2
pydantic_core-2.20.1

附:
我在 .env.prod 中填写的地址

Screenshot_20240831-203959~2

elf-rss 启动时读取到的地址

Screenshot_20240831-203930~3

@Quan666
Copy link
Owner

Quan666 commented Aug 31, 2024

URL/开头试试

@baka23
Copy link
Author

baka23 commented Aug 31, 2024

恕我冒昧

rss_class.py 中 get_url 只考虑到了订阅地址开头可能带 "/" 但没有考虑到 rsshub 地址末尾带 "/" 的情况,即使这不是被用户添加的

@Quan666
Copy link
Owner

Quan666 commented Aug 31, 2024

你可以考虑帮着修复下
我已经不再使用这个项目了

@baka23
Copy link
Author

baka23 commented Aug 31, 2024

还是要说句谢谢,我要去学一下怎么提pr了)

@baka23 baka23 closed this as completed Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants