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

FragVoice的md5值是错误的! #202

Closed
Sorceresssis opened this issue Jun 11, 2024 · 3 comments
Closed

FragVoice的md5值是错误的! #202

Sorceresssis opened this issue Jun 11, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Sorceresssis
Copy link

Sorceresssis commented Jun 11, 2024

简要描述这个bug

一些古老的帖子的语音的voice_md5是没有像 _123456 这样的后缀的。在爬取这些语音时FragVoice获取到的md5值会是31位,而不是32位。

虽然一些有_123456 这样后缀的语音可以正常获得32位的md5值。但是我不认为应该截去 _123456 后缀。因为voice_md5是语音文件的唯一标识。截去了后缀那么他也就失去了意义。无法通过它来下载语音文件了。

...

如何复现

在何种场景下用何种操作复现

tid=3446316934

错误的md5
pid=61142845967 floor=49 md5=9c891542e8d14f21d047f455b86ae22 url=https://tiebac.baidu.com/c/p/voice?voice_md5=9c891542e8d14f21d047f455b86ae22&play_from=pb_voice_play

正确的md5
pid=61142845967 floor=49 md5=9c891542e8d14f21d047f455b86ae22b url=https://tiebac.baidu.com/c/p/voice?voice_md5=9c891542e8d14f21d047f455b86ae22b&play_from=pb_voice_play

你希望程序作出何种行为
应该直接返回voice_md5,不做任何截取处理。
image
...

截图(可选)

...

@n0099
Copy link

n0099 commented Jun 11, 2024

而我对PbContent.proto的唯一修改是针对统计上第二常见的type=3图片中的字段进行正义削除只留下文件名hash部分
n0099/open-tbm@8477e81#diff-95921e765722e1b2e2c0ca1a1fe56c7431f408bb154416090f6cf27702806703R55
因为此前我还没大脑升级zfs+zstd透明压缩立省2x压缩比所以需要这样来节省(所有PbContent.protoencoding二进制中的)10%左右存储但现在有了压缩也没必要这样提前优化还打破了不修改贴吧返回的protobuf encoding二进制之承诺(假设protoc所codegen出的parser/encoder可以保证往复一致性(encode(parse(encoding))==encoding),然而目前只知道proto3保证了proto2时的行为:通过parse时放进unknownFields来保留.proto中没定义的fieldnum)

lumina37 added a commit that referenced this issue Jun 12, 2024
@lumina37 lumina37 added the bug Something isn't working label Jun 12, 2024
@lumina37
Copy link
Owner

946b8f3 应该修复了,看看能不能用

@Sorceresssis
Copy link
Author

谢谢,可以正常使用了。

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

3 participants