|
|
|
@ -18,6 +18,7 @@ import com.google.gson.Gson; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashMap; |
|
|
|
|
|
|
|
import java.util.LinkedHashMap; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
import java.util.concurrent.Callable; |
|
|
|
import java.util.concurrent.Callable; |
|
|
|
import java.util.concurrent.ExecutorService; |
|
|
|
import java.util.concurrent.ExecutorService; |
|
|
|
@ -160,9 +161,9 @@ public class SiteViewModel extends ViewModel { |
|
|
|
SpiderDebug.log(searchContent); |
|
|
|
SpiderDebug.log(searchContent); |
|
|
|
post(site, Result.fromJson(searchContent)); |
|
|
|
post(site, Result.fromJson(searchContent)); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
HashMap<String, String> params = new HashMap<>(); |
|
|
|
LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
|
|
|
if (site.getType() != 0) params.put("ac", "detail"); |
|
|
|
|
|
|
|
params.put("wd", keyword); |
|
|
|
params.put("wd", keyword); |
|
|
|
|
|
|
|
if (site.getType() != 0) params.put("ac", "detail"); |
|
|
|
String body = OKHttp.newCall(site.getApi(), params).execute().body().string(); |
|
|
|
String body = OKHttp.newCall(site.getApi(), params).execute().body().string(); |
|
|
|
SpiderDebug.log(site.getName() + "," + body); |
|
|
|
SpiderDebug.log(site.getName() + "," + body); |
|
|
|
if (site.getType() == 0) post(site, Result.fromXml(body)); |
|
|
|
if (site.getType() == 0) post(site, Result.fromXml(body)); |
|
|
|
|