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

关于图像获取的疑问 #246

Closed
JvJvless opened this issue Dec 13, 2024 · 4 comments
Closed

关于图像获取的疑问 #246

JvJvless opened this issue Dec 13, 2024 · 4 comments
Labels
question StackOverflow

Comments

@JvJvless
Copy link

最近好像hash2image出问题了

例如这个
http://tiebapic.baidu.com/forum/pic/item/e736593d269759eed5305aecf4fb43166c22df86.jpg?tbpicau=2024-12-24-05_9b2f900db059d6db9f520e3bd361ac29

直接使用链接是能请求到图像的,但是其对应的hash链接是不行的,得到的是“参数错误”
http://imgsrc.baidu.com/forum/pic/item/e736593d269759eed5305aecf4fb43166c22df86.jpg

对于这个图像,从浏览器找到的链接又是另一个,这个也是有效的:
http://tiebapic.baidu.com/forum/w%3D580/sign=5b418816e78b87d65042ab1737082860/e736593d269759eed5305aecf4fb43166c22df86.jpg?tbpicau=2024-12-24-05_a11510eadf5eaea440127b006fcf4d79


但是另外在寻找到了一些比较古老的博客中的链接仍然有效,形式又各不相同,例如:
2013-09-09
http://imgsrc.baidu.com/forum/w%3D580/sign=b2d2b3bb632762d0803ea4b790ed0849/a317fdfaaf51f3deafb1b5fc94eef01f3a297923.jpg
2016-09-26
http://imgsrc.baidu.com/forum/pic/item/03a4462309f79052204229be04f3d7ca7acbd5d5.jpg


目前百思不得其解,是否是imgsrc.baidu.com/forum/pic/item这个前缀对于较新的图像都失效了呢?
原始链接包含tbpicau这一项,似乎是有时限的,时间过久了只会返回一个贴吧图标(去掉tbpicau也是返回贴吧图标)
想请教一下是否还有可能存在像Hash这样过很长时间仍然有效的图像获取方式呢?

@n0099
Copy link

n0099 commented Dec 13, 2024

#63 (comment)

@JvJvless
Copy link
Author

#63 (comment)

万分感谢,之前没有翻到这个,非常抱歉

@lumina37 lumina37 added the question StackOverflow label Dec 14, 2024
@lumina37
Copy link
Owner

可以试试develop分支能不能正常获取图像

@JvJvless
Copy link
Author

可以试试develop分支能不能正常获取图像

之前尝试过dev分支的,不过报错
[WARN] [hash2image] 'Client' object has no attribute '_http_core'.
返回的图像也为空,不太会配置放弃了

按照 #63 (comment) 我加上了请求头测试是有效的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question StackOverflow
Projects
None yet
Development

No branches or pull requests

3 participants