0
我想查看香港IFC商城店的iPhone4s库存状态。Android jsoup,如何选择物品并转到下一页
所以,我需要去选择产品来检测库存状态“choose product link”。但是在选择产品页面之前,有必要选择上一页中的商店。如果我没有选择商店,并直接去选择产品页面,它会显示“您的会话超时。”
如何以编程方式选择Apple store reserve中的IFC商城,并通过jsoup转至下一页?
我想查看香港IFC商城店的iPhone4s库存状态。Android jsoup,如何选择物品并转到下一页
所以,我需要去选择产品来检测库存状态“choose product link”。但是在选择产品页面之前,有必要选择上一页中的商店。如果我没有选择商店,并直接去选择产品页面,它会显示“您的会话超时。”
如何以编程方式选择Apple store reserve中的IFC商城,并通过jsoup转至下一页?
它会显示“您的会话超时。”
会话由cookies支持。您需要通过将检索到的响应cookie发送回后续请求来维护会话。
// #1.
Connection connection1 = Jsoup.connect("http://example.com/firstpage");
Response response1 = connection1.execute();
Map<String, String> cookies = response1.cookies();
Document document1 = response1.parse(); // If necessary.
// ...
// #2.
Connection connection2 = Jsoup.connect("http://example.com/nextpage").cookies(cookies).data("param1", "value1");
Response response2 = connection2.execute();
cookies.putAll(response2.cookies());
Document document2 = response2.parse();
// ...
// Repeat #2.