Commit be8a0388 authored by shenjunlin's avatar shenjunlin

版本升级,异常处理

parent 6db681ba
......@@ -6,7 +6,7 @@
<version>7</version>
</parent>
<groupId>us.codecraft.duiba</groupId>
<version>0.7.7-SNAPSHOT</version>
<version>0.7.8-SNAPSHOT</version>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
<properties>
......
......@@ -3,7 +3,7 @@
<parent>
<groupId>us.codecraft.duiba</groupId>
<artifactId>webmagic-parent</artifactId>
<version>0.7.7-SNAPSHOT</version>
<version>0.7.8-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -3,7 +3,7 @@
<parent>
<groupId>us.codecraft.duiba</groupId>
<artifactId>webmagic-parent</artifactId>
<version>0.7.7-SNAPSHOT</version>
<version>0.7.8-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -48,8 +48,11 @@ public class Data5UProxyProvider implements ProxyProvider{
}
//返回结果 221.32.22.54:33084
private Proxy getProxyFromData5u() throws IOException {
private Proxy getProxyFromData5u() throws Exception {
String result = HttpClientUtils.doGet(data5UApiUrl);
if (StringUtils.contains(result,"false")) {
throw new Exception("data5U orderId is not correct");
}
String[] res = StringUtils.split(result, "\n");
String[] ipAndPort = StringUtils.split(res[0], ":");
return new Proxy(ipAndPort[0], Integer.valueOf(ipAndPort[1]));
......
......@@ -3,7 +3,7 @@
<parent>
<groupId>us.codecraft.duiba</groupId>
<artifactId>webmagic-parent</artifactId>
<version>0.7.7-SNAPSHOT</version>
<version>0.7.8-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -3,7 +3,7 @@
<parent>
<groupId>us.codecraft.duiba</groupId>
<artifactId>webmagic-parent</artifactId>
<version>0.7.7-SNAPSHOT</version>
<version>0.7.8-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -3,7 +3,7 @@
<parent>
<groupId>us.codecraft.duiba</groupId>
<artifactId>webmagic-parent</artifactId>
<version>0.7.7-SNAPSHOT</version>
<version>0.7.8-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
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