87,904
社区成员
发帖
与我相关
我的任务
分享
function Start_ScanC(){
if (statusC == 1 && WB2.checkLogin() == true) {
commentpage = 0;
//新一次的扫描重置页码
now_pointer = Find_Now(5);//查询指针
var w_info = Find_NowWeibo(now_pointer);
if (w_info != -1) {
var weiboid = w_info.rows[0].weiboid;
var weibocount = w_info.rows[0].comments_count;
now_pointer++;
Write_Now(now_pointer, 5);
if (weibocount > 0) {
WeiboComment(weiboid);
}
else {
Start_ScanC();
}
}
else
if (w_info == -1) {
Start_ScanU();
}
}
else {
Switch_APPKEYC();
}
}
function WeiboComment(weiboid){
if (statusC == 1) {
WB2.anyWhere(function(W){
W.parseCMD("/comments/show.json", function(sResult, bStatus){
if (bStatus == true) {
var Comments;
if_scanC = sResult.next_cursor;
try {
Comments = Comment_Json(sResult);//重新封装json 微博信息
}
catch (e) {
// alert("Comment_Json_Error:"+e)
}
if (Comments.length != 0) {
total_comment += Comments.length;
var count_comment = insertComment(Comments, weiboid);
if (count_comment == -1) {//插入失败
WeiboComment(weiboid);//继续执行
}
else {
t_count_comment += count_comment;
var total_comment = sResult.total_number - t_count_comment;
document.getElementById("All_TogetherC").innerHTML = t_count_comment;
the_num_scan_comment += Comments.length;
document.getElementById("Num_TogetherC").innerHTML = the_num_scan_comment + "||" + count_comment + "||" + formatDate(new Date());
if (if_scanC == 0 || sResult.comments.length == 0) {
//重新扫描
commentpage = 0;
n_cid = 0;
Start_ScanC();
}
else {
WeiboComment(weiboid);
}
}
}
else
if (Comments.length == 0 && if_scanC != 0) {
WeiboComment(weiboid);
}
else
if (Comments.length == 0 && if_scanC == 0) {
commentpage = 0;
n_cid = 0;
Start_ScanC();
}
}
else {
statusC = 0;
ask_flagC--;
commentpage--;
Switch_APPKEY3(weiboid);
}
Comments = null;
}, {
count: 150,
id: weiboid,
max_id: n_cid,
page: ++commentpage
}, {
method: 'get'
});
});
}
}