如何以编程方式从网站上下载的图像? [英] How to programmatically download image from website?

查看:87
本文介绍了如何以编程方式从网站上下载的图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从一个网站下载图像,和我有登录名和密码,但如果我只是使用URL下载图像,它会抛出一个异常:没有在会议上没有价值

I need to download images from a website, and I have the login name and password, but if i just use URL to download the image, it will throw a exception: there is no value in session.

我想我需要登录的网站之前,我可以以编程方式下载图像。

I think I need to login the website before I can programmatically download the image.

你有什么办法呢?在此先感谢!

Do you have any solutions ? Thanks in advance !

推荐答案

我想提 的HtmlUnit 。这是一个无头的浏览器使用JavaScript的Java。

I'd like to mention HtmlUnit. It is a headless browser with Javascript for Java.

这篇关于如何以编程方式从网站上下载的图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆