Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
lcstore committed Jan 14, 2015
1 parent 6a4462e commit 93a17fa
Show file tree
Hide file tree
Showing 4 changed files with 3,854 additions and 27,183 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ qiniu_accessKey=dwCDiS4sTkm_8aXoesOHIvFKy65OdrBskcxThAmv
qiniu_secretKey=vflRTCRrydngKk7QRYcTh7BYmsG-9KeH-NET4riL
qiniu_bucket=istore

#dlinked1001
qiniu_accessKey=fQvW5tvryZ9YoAPgOUH-AwjaFRJImsgekp8NgIrG
qiniu_secretKey=SbZs6Nr3fZTP23I0vodwGkyOnYOdXN6PSzxvoxEy
qiniu_bucket=d1002

#dlinked
qiniu_accessKey=9LRrNHyvLCeGLIreQ44VOPUgwyHsHEGFmto0CKtf
qiniu_secretKey=vgkZsUExS4fc4Iym1FZPEgRe5BxItMnKmv0Ew0dk
qiniu_bucket=d1001

#dlinked1001
qiniu_accessKey=fQvW5tvryZ9YoAPgOUH-AwjaFRJImsgekp8NgIrG
qiniu_secretKey=SbZs6Nr3fZTP23I0vodwGkyOnYOdXN6PSzxvoxEy
qiniu_bucket=d1002
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,15 @@ public void testSocketProxy() throws Exception {
socksaddr = new InetSocketAddress("115.112.189.79", 8080);
socksaddr = new InetSocketAddress("37.228.134.52", 7808);
socksaddr = new InetSocketAddress("110.139.128.4", 80);
socksaddr = new InetSocketAddress("209.141.9.201", 1080);
socksaddr = new InetSocketAddress("92.62.57.5", 1080);

// http://www.xroxy.com/proxy-type-Socks5.htm
// socksaddr = new InetSocketAddress("61.147.67.2", 9125);
// socksaddr = new InetSocketAddress("124.42.127.221", 1080);
// socksaddr = new InetSocketAddress("180.153.139.246", 8888);
String url = "http://item.yhd.com/item/102301?tp=1.0.61.0.9.Kcjj6mx";
url = "http://1111.ip138.com/ic.asp";
// url = "http://1111.ip138.com/ic.asp";
HttpGet get = new HttpGet(url);
get.addHeader("Referer", url);
get.getParams().setParameter(ProxySocketFactory.SOCKET_PROXY, new Proxy(Proxy.Type.SOCKS, socksaddr));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import com.lezo.iscript.spring.context.SpringBeanUtils;
import com.lezo.iscript.utils.InetAddressUtils;
import com.lezo.iscript.utils.JSONUtils;
import com.sun.xml.internal.ws.developer.MemberSubmissionEndpointReference.Elements;

public class ProxyAddrServiceImplTest {

Expand All @@ -36,7 +35,7 @@ public void testFindProxys() throws Exception {
ProxyAddrDao proxyAddrDao = SpringBeanUtils.getBean(ProxyAddrDao.class);
ProxyAddrServiceImpl brandService = new ProxyAddrServiceImpl();
brandService.setProxyAddrDao(proxyAddrDao);
int maxCount = 142;
int maxCount = 174;
for (int i = 1; i <= maxCount; i++) {
try {
// String url =
Expand All @@ -53,12 +52,16 @@ public void testFindProxys() throws Exception {
// String url =
// String.format("http://proxy-list.org/english/index.php?p=%d",
// i);
String url = String.format("http://free-proxy.cz/en/proxylist/main/%d", i);
// String url =
// String.format("http://free-proxy.cz/en/proxylist/main/%d",
// i);
// String url = String.format("http://www.blackhatworld.com/blackhat-seo/proxy-lists/354949-200-scrapebox-passed-http-proxies-freshly-verified-w-screenshot-daily-updates-%d.html", i);
String url = String.format("http://socks5proxies.com/index.php?page=%d&action=freeproxy", i);
// String url =
// String.format("http://www.samair.ru/proxy/proxy-%s.htm", i <
// 10 ? "0" + i : i);
System.err.println("start to parser:" + url);
byte[] byteArray = Jsoup.connect(url).header("Accept-Encoding", "gzip, deflate").userAgent("Mozilla").referrer(url).method(Method.GET).execute().bodyAsBytes();
byte[] byteArray = Jsoup.connect(url).header("Accept-Encoding", "gzip, deflate").timeout(120000).userAgent("Mozilla").referrer(url).method(Method.GET).execute().bodyAsBytes();
String source = new String(byteArray, "gbk");
List<ProxyAddrDto> pageList = findProxy(source);
if (pageList.size() < 5) {
Expand Down
Loading

0 comments on commit 93a17fa

Please sign in to comment.