简体   繁体   English

java 脚本,带有 httpclient 的 post 方法

[英]java script with post method of httpclient

I am trying to login to yahoo.de with httpclient in java (I am crawling the site).我正在尝试使用 java 中的 httpclient 登录 yahoo.de(我正在抓取该站点)。 To submit a form having username and password, I use Postmethod.要提交具有用户名和密码的表单,我使用 Postmethod。 I found that I have to pass some hidden values (which are generated dynamically) along with username and password in post method.我发现我必须在 post 方法中传递一些隐藏值(动态生成)以及用户名和密码。 Does anybody know how do I do this?有人知道我该怎么做吗? How do I handle javascript with httpclient?如何使用 httpclient 处理 javascript? Any help would be appreciated !任何帮助,将不胜感激 !

I doubt HTTPClient would support java-script, you might have to find if Yahoo supports non-javascript login process in the page and grasp those fields to login through.我怀疑 HTTPClient 是否会支持 java-script,您可能必须在页面中查找 Yahoo 是否支持非 JavaScript 登录过程并掌握这些字段以进行登录。

Otherwise use, yahoo's open-id API to authenticate the user.否则,使用 yahoo 的 open-id API 对用户进行身份验证。 More information here: http://developer.yahoo.com/openid/更多信息在这里: http://developer.yahoo.com/openid/

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

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