- 打开谷歌浏览器或者火狐浏览器
登陆你的微博,找到你要转发的微博,通过键盘的F12或者右击空白处找到“审查元素”或者“检查”调出控制台,如下图:
当前页面正常转发一次,转发完成后,看右边的控制台(有些浏览器的控制台是在浏览器下方),在最上面找到并点击network(如下图),在下方找到forward,注意右边我画圈的地方,等下会用到。
复制我这段代码:
// 评论微博并转发
function commentWeibo(content) {
var Data = new FormData();
Data.append('pic_src', '');
Data.append('pic_id', '');
Data.append('appkey', '');
// mid为该微博的id
Data.append('mid', '4395362472893642');
Data.append('style_type', '2');
Data.append('mark', '');
//reason为转发内容
Data.append('reason', content);
Data.append('location', 'page_100505_home');
Data.append('pdetail', '1005055656711630');
Data.append('module', '');
Data.append('page_module_id', '');
Data.append('refer_sort', '');
Data.append('is_comment_base', '1');
// Data.append('is_comment', '1');
Data.append('rank', '0');
Data.append('rankid', '');
Data.append('isReEdit', '');
Data.append('_t', '0');
var xhr = new XMLHttpRequest();
xhr.timeout = 3000;
xhr.responseType = "text";
xhr.open('POST', 'https://weibo.com/aj/v6/mblog/forward?ajwvr=6&domain=100505&__rnd=' + new Date().getTime(), true);
xhr.onload = function(e) {
if (this.status == 200 || this.status == 304) {
var data = JSON.parse(this.responseText);
if (data.code == "100000") {
// 转发微博成功
console.log("成功",content);
}else {
// 转发微博失败
console.log("失败",data,content);
}
}
};
xhr.send(Data);
}
var arr = ['[给你小心心]','[中国赞]','[doge]','[喵喵]','[抱抱]','[跪了]','[吃瓜]','[允悲]','[坏笑]','[笑cry]','[馋嘴]','[顶]','[微笑]','[偷笑]','[舔屏]','[亲亲]','[太开心]','[挤眼]','[色]','[可爱]','[钱]','[思考]','[困]','[互粉]','[睡]','[并不简单]','[害羞]','[哈哈]','[哼]','[哈欠]','[笑而不语]','[嘻嘻]','[爱你]','[吃惊]','[污]','[鼓掌]','[憧憬]','[酷]','[good]',,'[心]','[作揖]','[NO]','[ok]','[赞]','[拳头]','[haha]','[加油]','[握手]','[来]','[男孩儿]','[女孩儿]','[耶]','[奥特曼]','[话筒]','[礼物]','[飞机]','[干杯]','[围脖]','[围观]','[蛋糕]','[微风]','[音乐]','[鲜花]','[太阳]','[兔子]','[照相机]','[熊猫]','[喜]','[威武]','[弗莱见钱眼开]','[带着微博去旅行]','[偷乐]','[笑哈哈]','[羞嗒嗒]','[好爱哦]','[赞啊]','[求关注]','[好喜欢]','[钢铁侠]','[美国队长]','[浩克]','[雷神]','[洛基]','[蜘蛛侠]','[奇异博士]','[黑寡妇]','[冬兵]','[格鲁特]','[米奇喜欢]','[米奇飞吻]','[米奇大哭]','[米奇比心]','[Aloha]','[米奇爱你]','[哆啦A梦花心]','[哆啦A梦害怕]','[哆啦A梦吃惊]','[哆啦A梦汗]','[哆啦A梦微笑]','[伴我同行]','[哆啦A梦笑]','[哆啦A梦无奈]','[哆啦A梦美味]','[哆啦A梦开心]','[哆啦A梦亲亲]','[星星]','[给力]']
var arr1 = ["一种信仰,是一种阳光的追求","山是故人眸,柳是纤纤手","恒星","月夜明","心弦初惊","怀风曾寄影","云柯雨泽相映","漫天飞花喜看景",'非鱼戏水江心跃影',"如柏巍岑穿云曙光迎","未来可期共许风雨同行","此情何迟余生更坚定","斜晖照璧默然如镜","浮生若梦晓以情","风声过万林应","倚胡杨赏晴","红雪浮冰","渐显名","风静","聆" ,"琴瑟愿与,共沐春秋","滢溪潺潺,炊烟悠悠","敢请东风,玉成双偶","遥递佳信,知否知否","为理云鬓,为簪银钩","明月可鉴,情深亦寿","此生相依,人间白首","千金不易,清茶淡粥,","相思不扫,久积弥厚","给与随风,四海同心齐寄望","朱门回首,半轮明月宜相许","一盏清茶,流光逐影情系你","龙凤呈祥,飒沓江湖半沉浮","先修于心,烟雨蒙蒙任平生","生愿于灵,万般风景如水若","的却初萌,朗日随云皆似梦","七情入眼,低头浅笑一心收","夕照流风,不留余生长久视","祝酒浅斟,遍书满纸短情长 ","福缘相结,抹烟谈笑映霓虹","愿你所到之处皆为热土","愿你所遇之人皆为良善","纵有山河巍巍,不及你笑眼弯弯"]
function randomWord(randomFlag, min, max){
var str = "",range = min;
// 随机产生
if(randomFlag){
range = Math.round(Math.random() * (max-min)) + min;
}
for(var i=0; i<range; i++){
pos = Math.round(Math.random() * (arr.length-1));
str += arr[pos];
}
return str;
}
// 每600秒评论一次
var count = 0;
setInterval(function(){
var str = arr1[count%108]+arr[count%108]+"一定可以滴//@一个长长的微博名: 转发微博 " ;
count++;
commentWeibo(str);
}, 600001);
将这些代码复制到Console里,如图: