简体   繁体   English

复杂的Web文档检索

[英]Complex retrieval of a web document

I need to retrieve a document from a website, and parse it. 我需要从网站检索文档并进行解析。 Problem is that: 问题是:

  1. The site uses both http and https protocol 该网站同时使用http和https协议
  2. You need to log in the site (I have a regular account) 您需要登录该网站(我有一个普通帐户)
  3. From the login page, there are at least 2 redirect just to log in yourself 在登录页面上,至少有2个重定向只是为了自己登录

I managed an HTTPS connection and posted my login and pass, but I'm having troubles with cookie management and the redirect.... 我管理了HTTPS连接并发布了登录名和密码,但是在cookie管理和重定向方面遇到了麻烦。

commons-httpclient会有所帮助。

使用类似HtmlUnit的库可能会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM