0
此API提供来自网站的缩略图。如何从这个网址获取jpg?
<img style="-webkit-user-select: none" src="http://webthumb.bluga.net/easythumb.php?user=00000&url=www.consumerreports.com&hash=sdf9g879d8f7g9sd8fg7s9df&size=medium&cache=30">
的用户ID和散列值已经删节,但如果他们是正确的,这个标签会导致网页上的小缩略图叫easythumb.jpeg
。
有没有办法抓住缩略图并将其存储在我的数据库或AWS中?
或者是webthumb精心设计,以防止这种行为?
编辑:
尝试引入nokogiri每下面的建议,而这里的回报。它看起来像没有办法得到一个JPG。我对吗?
可能重复? http://stackoverflow.com/questions/1074309/how-do-i-download-a-picture-using-ruby – 2014-11-01 02:44:10
不 - 那个问题在url中有一个jpg - 我的没有。 – dwilbank 2014-11-01 02:59:57
啊。检查了这一点:http://stackoverflow.com/questions/7926675/save-all-image-files-from-a-website - 最佳答案建议使用Nokogiri,我也用于抓取/下载 – 2014-11-01 03:05:31