- /**dao方法
- * 取得pk页面
- * @param sid
- * @return 为null就是链接超时
- */
- public String getPKPage(String sid){
- String temp;
- int ii=0;
- do {
- temp=ClientGetUrl(superqqurl+"?"+sid);
- } while (temp==null);
- if(temp.indexOf("超级QQ加速专区")!=-1){
- ArrayList<String> groupHashMap= getqqGroups(temp);
- ArrayList<String> arrayList=new ArrayList<String>();
- for (int i = 0; i < groupHashMap.size(); i++) {
- String temp2;
- do {
- temp2=ClientGetUrl(superqqurl+"?"+sid+"&groupID="+groupHashMap.get(i));
- } while (temp2==null);
- if(temp2!=null&&!"".equals(temp2)){
- //System.out.println(temp2);
- Integer page=pkPageSize(temp2);
- for (int j =1; j <=page+1; j++) {
- String temp3;
- do {
- temp3=ClientGetUrl(superqqurl+"?"+sid+"&groupID="+groupHashMap.get(i)+"&pageNo="+j);
- } while (temp3==null);
- if(temp3!=null&&!"".equals(temp3)){
- geiFriendPkUrl(temp3,arrayList);
- }
- }
- }
- }
- System.out.println(arrayList.size());
- for (int i = 0; i < arrayList.size(); i++) {
- //抢夺sprobrslt //pk sppkresult
- //System.out.println(arrayList.get(i));
- ClientGetUrl(arrayList.get(i));
- String temp22= arrayList.get(i);
- temp22=temp22.replace("sppkresult","sprobrslt");
- ClientGetUrl(temp22);
- ii++;
- }
- }
- return String.valueOf(ii);
- }
- //该片段来自于http://www.codesnippet.cn/detail/1509201410399.html
来源: http://www.codesnippet.cn/detail/1509201410399.html