如何使用jsoup在URL中循环请求数据参数?
How to use jsoup for making a loop in URL to request data parameters?
如何在URL中使用jsoup循环请求数据参数?
我做的循环用了很长时间。
例如
static String[] cValues = {"AED", "AFN", "ALL", "AMD", "ANG","AOA","ARS","AUD","AZN","BBD","BDT","BGN","BHD","BIF"};
for(int i=0;i<cValues.length;i++){
for(int y=0;y<cValues.length;y++) {
doc = Jsoup.connect("http://www.zzz.com/finance/converter?a=1&from="+cValues[i]+"&to="+cValues[y]+"").get();
Element m = doc.select("div#zzz").first();
System.out.println(cValues[i] + "-" + cValues[y] + m.child(0).text());
}}
如何在URL中使用jsoup循环请求数据参数?
我做的循环用了很长时间。
例如
static String[] cValues = {"AED", "AFN", "ALL", "AMD", "ANG","AOA","ARS","AUD","AZN","BBD","BDT","BGN","BHD","BIF"};
for(int i=0;i<cValues.length;i++){
for(int y=0;y<cValues.length;y++) {
doc = Jsoup.connect("http://www.zzz.com/finance/converter?a=1&from="+cValues[i]+"&to="+cValues[y]+"").get();
Element m = doc.select("div#zzz").first();
System.out.println(cValues[i] + "-" + cValues[y] + m.child(0).text());
}}