ユーザーがユーザー名とパスワードを入力してからログインボタンをクリックすると、ボタンと2つのテキストボックスが必要です。ログインアクションが実行され、ユーザーを歓迎して別のページに移動します.私のコードは次のようでした:
try {
Connection.Response res = Jsoup.connect("URL")
.data("log", "abcd", "pwd", "12345", "wp-submit", "প্রবেশ", "redirect_to", "url", "testcookie", "1")
.method(Method.POST)
.execute();
Map<String, String> cookies = res.cookies();
Document doc2 = Jsoup
.connect("new_url")
.cookies(cookies)
.get();
s = doc2.text().toString();
t.setText(s);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
t.setText("no");
}
しかし、ログインアクションは成功できず、ここでは常に「いいえ」と表示されます。どうすればそれを成功させることができますか???