如何查看 .asp 图像?
我正在尝试使用 Perl 从网站下载图像,并使用 LWP::Simple.getstore 下载并保存它们。
以下是 URL
http://www.aavinvc.com/_includes/blob.asp?Table=user&I=28&Width=100!&Height=100!
结果我用 LWP 得到的文件完全是空的。我什至尝试了 cURL 和同样的事情,完全是空的。还有其他方法可以得到这些吗?
I am trying to download images from a site using Perl to download and save them with LWP::Simple.getstore.
Here's an example of the URL
http://www.aavinvc.com/_includes/blob.asp?Table=user&I=28&Width=100!&Height=100!
Turns out the files are completely empty that I am getting with LWP. I even tried cURL and same thing, completely empty. Would there be another way to get these?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果文件确实包含 ASP,那么您必须通过 ASP 引擎运行它。
如果一切正常,则 URL 将返回具有适当内容类型的图像文件。您刚刚使用 .asp 扩展名保存了它。
修复很简单:重命名文件(最好通过查看返回的 Content-Type 标头(对于 LWP 来说很简单,但我认为您必须超越
getstore
) 。关于更新:
我刚刚尝试过:
...文件在我的默认图像查看器中顺利打开
If the file really contains ASP, then you have to run it through an ASP engine.
If things worked properly, then the URL would return an image file with an appropriate content type. You've just saved it with a .asp extension.
The fix is simple: Rename the file (preferably by looking at the Content-Type header returned (trivial with LWP, but I think you'll have to move beyond
getstore
) and doing it in Perl.Regarding the update:
I just tried:
… and it just worked. The file opened without a hitch in my default image viewer.
.asp 不是图像格式。
这里有两个解释:
.asp is not an image format.
Here are two explanations: