java下的 多线程爬虫
输入线程数目
源代码在线查看: http$%%passport.baidu.com%#business&aid=6&un=%c3%d4%a1%c5%ca%a7.html
百度用户信息中心_迷∨失 .p1 {FONT-SIZE: 14px; LINE-HEIGHT: 24px; FONT-FAMILY: "宋体"}.f12 {FONT-SIZE: 12px; LINE-HEIGHT: 20px}form{MARGIN: 0px; PADDING: 0px;}body{margin:4px 8px 0 8px}td{font-size:12px;line-height:18px}a:link{color:#261cdc}a:visited{color:#261cdc}.c{color:#7777CC;}a.c{color:#7777CC;}a.c:visited{color:#7777CC;}.ft{text-align:center;height:20px;padding-top:2px;font-size:12px;background-color:#E6E6E6;color:#000000;font-family:Arial}.fB{ font-weight:bold}.f14{font-size:14px;line-height:20px}.padL10{padding-left:10px}.tithdl{padding-left:10px;font-size:14px;font-weight:bold;background-color:#D9F0F0}.tithdr{padding-right:10px;font-size:12px;text-align:right;background-color:#D9F0F0}#tab{clear:both;text-align:center;width:600px}#tab ul{margin:0;padding:0}#tab li{display:inline}#tab span{position:relative;top:0;margin:-1px 8px 0 0;float:left;background:#D9F0F0;border-right:1px solid #6FBDCE;border-top:1px solid #6FBDCE;border-left:1px solid #6FBDCE;padding:4px 10px 3px 10px;font-size:14px;font-weight:bold}#tab a{position:relative;top:0;margin:-1px 8px 0 0;float:left;background:#FFFFFF;border-right:1px solid #DDDDDD;border-top:1px solid #DDDDDD;border-left:1px solid #DDDDDD;padding:3px 10px 3px 10px;font-size:14px}#tabarea{text-align:left;border-top:1px solid #6FBDCE;clear:both;margin-top:-1px}.titbgusr{height:24px;background-color:#D9F0F0}.titusrl{padding-left:10px;font-size:14px;font-weight:bold}.titusrr{padding-right:10px;font-size:14px;text-align:right}.listhd{height:24px;font-weight:bold;background:#E8F6F6}.listtd{padding-top:10px;padding-bottom:10px;border-bottom:1px solid #CCCCCC}.listtd2{padding-top:5px;padding-bottom:5px;border-bottom:1px solid #E1E1E1}.listtp{font-size:14px}.listtp2{font-size:14px}.listcnt{width:98%;word-break:break-all;word-wrap:break-word}.more{padding-left:10px;font-size:14px;font-weight:bold;height:35px;line-height:35px}.usrbar{font-size:12px;height:19px;line-height:19px;font-family:Arial}.gray{color:#666666}.red{color:#FF0000}.sendpanel{background-color:#D9F0F0}.adminpanel{background-color:#E8F6F6}.p14{font-size:14px}.pb{font-weight:bold}.ln28{height:28px;border-bottom:1px solid #E1E1E1;padding-left:6px}.f14ln20{font-size:14px;line-height:20px}.bgpagLn{font-family:Arial;font-size:14px}#ft{clear:both;line-height:20px;background:#E6E6E6;text-align:center;margin:auto auto;}#ft,#ft *{color:#77C;font-size:12px;font-family:Arial} .username{margin-bottom:5px;font-size:14px;font-weight:bold;font-family:Arial}.profile td{color:#666666;font-size:14px}.profile a:hover{padding:1px;background:#261CDC;color:#FFFFFF;text-decoration:none}.proline{margin-left:5px;margin-top:10px;line-height:10px;border-top:1px dashed #A6A6A6;}.proitem{margin-left:5px;line-height:22px;font-size:14px;}.proitem .tit{color:#666666}.proitem a:hover{padding:1px;background:#261CDC;color:#FFFFFF;text-decoration:none}.style1 {color: #333333}.sc a{line-height:20px;}#maindiv{width:100%;min-width:760px;}document.domain = "baidu.com";var tabinfo = new Array();tabinfo[0]="";tabinfo[1]=new Array();tabinfo[1][0]="http://tieba.baidu.com/f?ct=352321536&tn=bdPPUserSearch&rn=6&pn=0&lm=65541&kw=&rs2=2&myselectvalue=2&word=%C3%D4%A1%C5%CA%A7";tabinfo[1][1]="";tabinfo[1][2]="";tabinfo[2]=new Array();tabinfo[2][0]="http://zhidao.baidu.com/q?ct=24&cm=18&tn=oupsscore&un=%C3%D4%A1%C5%CA%A7";tabinfo[2][1]="http://zhidao.baidu.com/q?ct=17&tn=oupsanswer&word=%C3%D4%A1%C5%CA%A7&rn=10&lm=459264";tabinfo[2][2]="";tabinfo[3]=new Array();tabinfo[3][0]="http://baike.baidu.com/usercard/?un=%C3%D4%A1%C5%CA%A7";tabinfo[3][1]="";tabinfo[3][2]="";tabinfo[4]=new Array();tabinfo[4][0]="http://zhangmen.baidu.com/userprom.jsp?username=%C3%D4%A1%C5%CA%A7";tabinfo[4][1]="";tabinfo[4][2]="";tabinfo[5]=new Array();tabinfo[5][0]="http://cang.baidu.com/%C3%D4%A1%C5%CA%A7/";tabinfo[5][1]="";tabinfo[5][2]="_blank";function gethash(num){ //处理锚点的,以逗号分割的前num个值 nowurl = location.hash.slice(1); arrayurl = nowurl.split(','); for(j=0;j0 && ab= 0 ){ if(id == (url.length-1)) url = url +"t="+ timenow; else url = url +"&t="+ timenow; }else{ url = url +"?t="+ timenow; } } document.getElementById("ifrext").style.height=0; document.getElementById("ifrext").src = url; showDiv("tabarea1",0); showDiv("tabarea2",1); } location.hash = tabid;}function showDiv(divid,status){//status: 1-show,0-hidden var curDiv = document.getElementById(divid); if(curDiv){ //alert(curDiv); if(status==0) curDiv.style.display = "none"; else curDiv.style.display = ""; }}function chgdeftab(defaulttab_value){ hasharray = gethash(2); if(hasharray[0] >= 0 && hasharray[0] < tabinfo.length ){ defaulttab_value = hasharray[0]; } clicktab(defaulttab_value);}登录 | 注册var loginflag=0;用户资料用户资料贴吧发言贴吧发言知道回答知道回答百科贡献百科贡献音乐掌门人音乐掌门人搜藏记录搜藏记录 加为好友 发送消息var showFlg = false;function setStr_detail(fn, word, str){ return ""+str.replace(//g,">")+"";}function setHtml_detail(str,fn){ if(str == "") return ""; var arr = str.split(";"); var arrHtml = new Array(); var strTmp = ""; for(var i=0,n=arr.length;i