0

I want to take some metadata using my imdb pro account.

The page that I'm going to look for is this:

https://pro-labs.imdb.com/title/{IMDB ID}

I try to open the link with Jsoup, but it returns the following error:

java.io.IOException: 403 error loading URL http://pro.imdb.com/signup/v4/login?u=https://pro-labs.imdb.com/title/{IMDB ID}.

This is because I am not logged.

This is the login page: https://secure.imdb.com/signup/v4/login.

How can I make a request to include my log in info?

4

1 回答 1

1

Jsoup 仅对登录/身份验证提供有限支持。最好使用另一个库(推荐:Apache HttpClient)来执行此操作。

通常,您可以执行以下步骤:

  1. 使用例如登录。HttpClient
  2. 将网站下载到缓冲区
  3. 使用 jsoup解析这个缓冲区
  4. 根据需要处理内容
于 2013-05-13T14:50:24.943 回答