有谁知道通过 https 获取网页的 Java 库吗?
does anyone know of a Java library to fetch webpages through https?
从 1.4 开始,你可以使用无聊的旧 URL.openConnection()...
As of 1.4, you can use boring old URL.openConnection()...
看一下 HttpClient
Take a look at HttpClient
Sun 的 Java 教程中有一个很好的示例,说明如何直接获取网站内容。
http://java.sun.com/docs/books/教程/networking/urls/readingURL.html
但是,如果您想获取其全部内容,包括脚本、图像和其他内容,您将必须自己解析链接并下载它们。
There is a great example of how to fetch a websites contents right in Sun's Java tutorial.
http://java.sun.com/docs/books/tutorial/networking/urls/readingURL.html
However if you want to fetch it's entire contents including scripts, images, and other goodies, you will have to parse out the links yourself and download them as well.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(3)
从 1.4 开始,你可以使用无聊的旧 URL.openConnection()...
As of 1.4, you can use boring old URL.openConnection()...
看一下 HttpClient
Take a look at HttpClient
Sun 的 Java 教程中有一个很好的示例,说明如何直接获取网站内容。
http://java.sun.com/docs/books/教程/networking/urls/readingURL.html
但是,如果您想获取其全部内容,包括脚本、图像和其他内容,您将必须自己解析链接并下载它们。
There is a great example of how to fetch a websites contents right in Sun's Java tutorial.
http://java.sun.com/docs/books/tutorial/networking/urls/readingURL.html
However if you want to fetch it's entire contents including scripts, images, and other goodies, you will have to parse out the links yourself and download them as well.