Commit c0a4cfaf by chenweitao

Merge branch 'working' into 'master'

增加抖音链接更新重试次数

See merge request !196
parents 41d50c1f 4c1756a3
...@@ -89,6 +89,7 @@ public class DouyinHotSearchCrawler { ...@@ -89,6 +89,7 @@ public class DouyinHotSearchCrawler {
String resultUrl = null; String resultUrl = null;
String htmlBody = null; String htmlBody = null;
Request request = RequestUtils.wrapGet(url); Request request = RequestUtils.wrapGet(url);
for (int x = 0; x < 3; x++) {
Response response = httpBoot.syncCall(request, ProxySupplier.NAT_HEAVY_PROXY); Response response = httpBoot.syncCall(request, ProxySupplier.NAT_HEAVY_PROXY);
if (response.hasCause()){ if (response.hasCause()){
Throwable cause = response.cause(); Throwable cause = response.cause();
...@@ -108,6 +109,7 @@ public class DouyinHotSearchCrawler { ...@@ -108,6 +109,7 @@ public class DouyinHotSearchCrawler {
} }
} }
} }
}
return resultUrl; return resultUrl;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment