SOURCE

!function (a) {
	 
	all_url=["https://weibo.com/238076780?profile_ftype=1&is_all=1#_0",
"https://weibo.com/501291525?profile_ftype=1&is_all=1#_0",
"https://weibo.com/ahfb", 
"https://weibo.com/bjfbt",
"https://weibo.com/bzfb",
"https://weibo.com/caijing",
"https://weibo.com/cctvxinwen",
"https://weibo.com/chinanewsv",
"https://weibo.com/cnsnfb",
"https://weibo.com/cqszfxwb?profile_ftype=1&is_all=1#_0",
"https://weibo.com/elinyi?refer_flag=1001030103_",
"https://weibo.com/fm1041",
"https://weibo.com/fsrb001",
"https://weibo.com/fyxcb",
"https://weibo.com/fzfb",
"https://weibo.com/guangzhoufabu",
"https://weibo.com/guanxianghuakai?profile_ftype=1&is_all=1#_0",
"https://weibo.com/hnrb1950?refer_flag=1001030103_",
"https://weibo.com/huaianfabu",
"https://weibo.com/hzwb001?profile_ftype=1&is_all=1#_0",
"https://weibo.com/inguilin?profile_ftype=1&is_all=1#_0",
"https://weibo.com/jiningxinxianshi?refer_flag=1001030103_",
"https://weibo.com/jjfb",
"https://weibo.com/lsnews?profile_ftype=1&is_all=1#_0",
"https://weibo.com/meishanfabu?profile_ftype=1&is_all=1#_0",
"https://weibo.com/nbfb",
"https://weibo.com/ndsgaj?is_hot=1",
"https://weibo.com/njfb",
"https://weibo.com/nnfabu?is_hot=1",
"https://weibo.com/qz66house?refer_flag=1001030103_",
"https://weibo.com/rmrb",
"https://weibo.com/shanghaicity",
"https://weibo.com/shenzhenfabu?is_hot=1",
"https://weibo.com/srfb",
"https://weibo.com/stfb?is_hot=1",
"https://weibo.com/syfbt",
"https://weibo.com/taizhoufabu001?profile_ftype=1&is_all=1#_0",
"https://weibo.com/tjszfxwbfb?is_hot=1",
"https://weibo.com/tonglingfabu",
"https://weibo.com/u/1417678504",
"https://weibo.com/u/1706904194?is_hot=1",
"https://weibo.com/u/1919816131?refer_flag=1001030103_",
"https://weibo.com/u/1974438244",
"https://weibo.com/u/2005802051",
"https://weibo.com/u/2074376453?is_hot=1",
"https://weibo.com/u/2085294265?profile_ftype=1&is_all=1#_0",
"https://weibo.com/u/2177412401",
"https://weibo.com/u/2425752947",
"https://weibo.com/u/2626472787",
"https://weibo.com/u/2639029341?is_hot=1",
"https://weibo.com/u/2645846213?is_hot=1",
"https://weibo.com/u/2730232527",
"https://weibo.com/u/2759348142",
"https://weibo.com/u/2779486914",
"https://weibo.com/u/2941157707",
"https://weibo.com/u/3214268410",
"https://weibo.com/u/3268152967",
"https://weibo.com/u/3329420380",
"https://weibo.com/u/3511698607?profile_ftype=1&is_all=1#_0",
"https://weibo.com/u/3514408660?is_hot=1",
"https://weibo.com/u/3535175740?is_hot=1",
"https://weibo.com/u/3542737112?refer_flag=1001030103_",
"https://weibo.com/u/3577849617?refer_flag=1001030103_&is_hot=1",
"https://weibo.com/u/3733829844",
"https://weibo.com/u/3757167087",
"https://weibo.com/u/3816699409?profile_ftype=1&is_all=1#_0",
"https://weibo.com/u/3817381137?refer_flag=1001030103_&is_hot=1",
"https://weibo.com/u/3877613768",
"https://weibo.com/u/3883727101?refer_flag=1001030103_",
"https://weibo.com/u/3907706821",
"https://weibo.com/u/3936431121",
"https://weibo.com/u/3958676634?refer_flag=1001030103_",
"https://weibo.com/u/5094710940",
"https://weibo.com/u/5167878023?profile_ftype=1&is_all=1#_0",
"https://weibo.com/u/5190828850",
"https://weibo.com/u/5211979483?profile_ftype=1&is_all=1#_0",
"https://weibo.com/u/5219022556",
"https://weibo.com/u/5234716148",
"https://weibo.com/u/5279514376?profile_ftype=1&is_all=1#_0",
"https://weibo.com/u/5455000625",
"https://weibo.com/u/5623185245?refer_flag=1001030103_",
"https://weibo.com/u/6050678177",
"https://weibo.com/u/6619634925?is_hot=1",
"https://weibo.com/u/7214104356?profile_ftype=1&is_all=1#_0",
"https://weibo.com/vneijiang?profile_ftype=1&is_all=1#_0",
"https://weibo.com/vziyang?profile_ftype=1&is_all=1#_0",
"https://weibo.com/wblishui?profile_ftype=1&is_all=1#_0",
"https://weibo.com/weiboqujing?profile_ftype=1&is_all=1#_0",
"https://weibo.com/wffabu?refer_flag=1001030103_",
"https://weibo.com/wuhufabu",
"https://weibo.com/wuxifabu",
"https://weibo.com/xmrb100cun?is_hot=1",
"https://weibo.com/xwfbc",
"https://weibo.com/ycfb?refer_flag=1001030103_",
"https://weibo.com/yibinfabu?profile_ftype=1&is_all=1#_0",
"https://weibo.com/yinchuan",
"https://weibo.com/yjrbs?is_hot=1",
"https://weibo.com/yulinfabu?profile_ftype=1&is_all=1#_0",
"https://weibo.com/yzfabu"];
	function getCookie(name) {           
        var arr = document.cookie.split(';');           
        for (var i = 0; i < arr.length; i++) {
            var arr2 = arr[i].split('=');
            var arrTest = arr2[0].trim();           
            if (arrTest == name) {                  
                    return arr2[1];
            }
        }
    }
	
	function setCookie(name, value) {
            var date = new Date();
            var expires = 10;
            date.setTime(date.getTime() + expires * 24 * 60 * 60 * 1000)
            document.cookie = name + "=" + value + ";expires=" + date.toGMTString() + ";path=" + "/";    
    }
    function b(a, c) {
        "function" == typeof chrome.extension.sendMessage ? b = function (a, b) {
            chrome.extension.sendMessage(a, b)
        } : "function" == typeof chrome.extension.sendRequest && (b = function (a, b) {
            chrome.extension.sendRequest(a, b)
        }), b(a, c)
    }

    function c(b, c, d) {
        var e = b.data, h = "true" == e.showCoverDefault.toString();
        return h == g ? void (f.style.opacity = e.coverOpacity) : (g = h, void (g ? a(f).animate({opacity: e.coverOpacity}, 1e3) : (f.style.opacity = String(e.coverOpacity), a(f).animate({opacity: 0}, 1e3))))
    }
	 
	function goToNextPage(cpage){
		var nextpage="";
		var cururl=window.location.pathname;
		var i=0;
		while(i<all_url.length){
			if(all_url[i].indexOf(cururl)>-1||all_url[i].indexOf(cpage)>-1){
				nextpage=all_url[i+1];
				console.log(nextpage);
				window.location.href=nextpage;
				break;
			}
			i+=1;
		} 
	}
	function pick_data(){
		var one_page_data=""
		var listTop=document.querySelector("div[node-type$='feed_list']").children;
		var i=0;
		var count=0;
		var filename="linyi"
		var cpage=""
		while(i <listTop.length){
			if(listTop[i].getAttribute('action-type')!=null){ 
				var wbdetail=getchildbyclass(listTop[i].children[0],"WB_detail");
				if(wbdetail==null){
					i+=1;
					continue;
				}
				var name=wbdetail.children[0].children[0].outerText;
				var urlid=wbdetail.children[0].children[0].getAttribute("usercard");
				if(urlid!=null&&urlid.length>10){
					urlid=urlid.substr(3);
					urlid=urlid.substring(0,urlid.indexOf("&"));
					cpage=urlid;
				} 
				var content="";
				console.log(i);
				if(wbdetail.children.length>4&&wbdetail.children[4].getAttribute("node-type")!=null&&wbdetail.children[4].getAttribute("node-type").indexOf("feed_list_content_full")>-1){
					content=wbdetail.children[4].outerText;
				}else{
					content=wbdetail.children[3].outerText;
				}
				var craete_time=wbdetail.children[1].firstElementChild.getAttribute('title');
				var contfrom="";
				if(wbdetail.children[1].children.length==2)
					contfrom=wbdetail.children[1].children[1].outerText;
				sharecount=listTop[i].children[1].children[0].children[0].children[1].outerText.replace("","").replace(/\ +/g,"").replace(/[\r\n]/g,"");
				goodcount=listTop[i].children[1].children[0].children[0].children[3].outerText.replace("ñ","").replace(/\ +/g,"").replace(/[\r\n]/g,"")
				comcount=listTop[i].children[1].children[0].children[0].children[2].outerText.replace("","").replace(/\ +/g,"").replace(/[\r\n]/g,"")
				if(name==null) 
					name=""
				if(content==null) 
					content="";
				if(craete_time==null)
					craete_time=""
				if (contfrom==null)
					contfrom=""
				var lineStr=name.replace(",",",")+","+content.replace(",",",")+","+craete_time.replace(",",",")+","+contfrom.replace(",",",")+","+window.location.href+","+sharecount+","+goodcount+","+comcount
				lineStr = lineStr.replace(/\ +/g,""); 
				lineStr=lineStr.replace(/[\r\n]/g,"")+"\r\n";
				one_page_data+=lineStr; 
				if(name.length>1){
					filename=name;
				}
				count+=1;
			} 
			i+=1;
		} 
		download(filename+".txt",one_page_data)
		//var file = new File([one_page_data], "world.txt", {type: "text/plain;charset=utf-8"});
		//saveAs(file); 
		console.log("linyi save time") 		
		goToNextPage(cpage);
	}
	function getchildbyclass(parant,cls){
		var n=0;
		while(n<parant.children.length){
			if(parant.children[n].getAttribute("class").indexOf(cls)>-1){
				return parant.children[n];
			}
			n+=1;		
		}
	}
	function anadata(){
		window.scrollBy(0, document.body.scrollHeight );
		var listTop=document.querySelector("div[node-type$='feed_list']").children;
		var count=0;
		var i=0;
		while(i <listTop.length){
			if(listTop[i].getAttribute('action-type')!=null){
				//console.log(i)
				var wbdetail=getchildbyclass(listTop[i].children[0],"WB_detail");
				if(wbdetail==null){
					i+=1;
					continue;
				}
				var expand=wbdetail.children[3].children;
				var j=0;
				while(j<expand.length){
					if(expand[j].outerText.indexOf("展开")>-1){
						expand[expand.length-1].click();
					}
					j+=1;
				} 
				count+=1;
			} 
			i+=1;
		} 
		var timeout = setTimeout(function () {pick_data();},3000); 
		console.log("lll+"+count);
	}
	function fake_click(obj) {
		var ev = document.createEvent("MouseEvents");
		ev.initMouseEvent(
			"click", true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null
		);
		obj.dispatchEvent(ev);
	}

	function download(name, data) {
		var urlObject = window.URL || window.webkitURL || window;
		var downloadData = new Blob([data]);
		var save_link = document.createElementNS("http://www.w3.org/1999/xhtml", "a")
		save_link.href = urlObject.createObjectURL(downloadData);
		save_link.download = name;
		fake_click(save_link);
	} 
	var sortiimes=0;
	function entry_data(){  
		var url = window.location.href;
		if(url.indexOf("weibo")>-1){
			var currentHei=document.body.scrollHeight;
			var timeout = setInterval(function () {
				sortiimes+=1;
				window.scrollBy(0, 500 );
				if(document.querySelector("div[node-type$='feed_list_page']")!=null||document.querySelector("div[node-type$='feed_list_shieldKeyword']")!=null){
					clearInterval(timeout); 
					anadata();
				}
				if(sortiimes>200){
					clearInterval(timeout); 
					anadata();
				}
			},30); 
			console.log(document.body.scrollHeight);
			
			//
		} 
	}

    function d() {
        b({type: "getConfig"}, function (b) {
            function c() {
                var b = Math.max.apply(null, a.map(a("body > *"), function (b, c) {
                    return parseInt(a(b).css("z-index")) || 1
                })), c = Math.max.apply(null, a.map(a("body > *"), function (b, c) {
                    return "relative" == a(b).css("position") ? parseInt(a(b).css("z-index")) || 1 : void 0
                }));
                return b = b + c + 2 >= 2147483647 ? b + c + 2 : 2147483647
            }

            g = "true" == b.showCoverDefault.toString(), a("#" + h).remove(), f = document.createElement("div"), f.id = h, f.setAttribute("style", "width: 100%; height: 100%; left: 0 !important;bottom: 0 !important;-webkit-transition: -webkit-transform 10s ease-in-out;overflow: hidden !important;background: #000000 !important;pointer-events: none !important;"), f.style.zIndex = c(), f.style.opacity = g ? b.coverOpacity : 0, document.body.appendChild(f), e()
        }) 
		var $ = jQuery;
		if($("#divcheck").length==0){
			var divcheck =document.createElement("div");
			divcheck.setAttribute("id","divcheck");  
			document.body.appendChild(divcheck);
			console.log('yilin3');
			setTimeout(function () { entry_data();
			},1000)
			
		}
    }
	

    function e(b) {
        new MutationObserver(function (c) {
            b && clearTimeout(b), b = setTimeout(function () {
                0 === a("#" + h).length && d()
            }, 100)
        }).observe(document.body, {childList: !0})
    }

    var f = null, g = !0, h = "__nightingale_view_cover";
    "complete" == document.readyState ? d() : window.addEventListener("DOMContentLoaded", function () {
        d()
    }), "undefined" != typeof chrome.extension.onMessage && chrome.extension.onMessage.addListener ? chrome.extension.onMessage.addListener(c) : "undefined" != typeof chrome.extension.onRequest && chrome.extension.onRequest.addListener && chrome.extension.onRequest.addListener(c), window.addEventListener("keydown", function (a) {
        if (a.altKey && 116 == a.keyCode) b({
            type: "setConfig",
            data: {name: "showCoverDefault", value: !g}
        }, function (a) {
        }); else if (a.altKey && 38 == a.keyCode) {
            if (!g || f.style.opacity <= .15) return;
            var c = Number(f.style.opacity);
            c = .15 >= c - .1 ? .1 : c - .1, b({
                type: "setConfig",
                data: {name: "coverOpacity", value: c}
            }, function (a) {
            })
        } else if (a.altKey && 40 == a.keyCode) {
            if (!g || f.style.opacity >= .95) return;
            var c = Number(f.style.opacity);
            c = .95 >= c + .1 ? c + .1 : .95, b({
                type: "setConfig",
                data: {name: "coverOpacity", value: c}
            }, function (a) {
            })
        } else if (a.altKey && 117 == a.keyCode) {
            if (!g) return;
            b({type: "setConfig", data: {name: "coverOpacity", value: .45}}, function (a) {
            })
        }
    }, !0);

    var location = window.location.href;
    if (location.indexOf("s.taobao.com") != -1) {
        var $ = jQuery;
        var conId = '_TAOBAO_CON';
        if ($('#'+conId).length > 0) {
            return false;
        }
        var cat = GetQueryString('cat');
        var q = $('#q').val();
        function aGet(page){
            bcd(q, cat, page, false, function (data) {
                var s = '';
                $.each(data,function (index,value) {
                    var num_iid = value['num_iid'];
                    var imgsrc = value['image_src']+'_230x230.jpg';
                    var href = value['click_url'];
                    var title = value['title'];
                    var volume = value['volume'];
                    var shop_title = value['shop_title'];
                    var wangwang_url = value['wangwang_url'];
                    var price_info = value['zk_final_price'];
                    var provcity = value['provcity'];
                    var icon_str = '';
                    if (value['is_tmall']) {
                        icon_str += '<li class="icon" data-index="0"><a href="//www.tmall.com/" target="_blank" trace="srpservice" traceidx="2"><span class="icon-service-tianmao"></span></a></li>';
                    }
                    s += '<div class="item J_MouserOnverReq t" data-category="auctions"><div class="pic-box J_MouseEneterLeave J_PicBox"><div class="pic-box-inner"><div class="pic"><a rel="noreferrer" id="J_Itemlist_PLink_'+num_iid+'" class="pic-link J_ClickStat J_ItemPicA" data-nid="'+num_iid+'" data-recommend-nav="" href="'+href+'" data-href="'+href+'" target="_blank" trace-nid="'+num_iid+'"><img id="J_Itemlist_Pic_'+num_iid+'" class="J_ItemPic img" data-src="'+imgsrc+'" alt="'+title+'" src="'+imgsrc+'"></a></div><div class="similars"><a rel="noreferrer" class="btn " target="_blank" href="/search?type=samestyle&app=i2i&rec_type=1&nid='+num_iid+'" data-spm-anchor-id="a230r.1.14.375"><s class="shim"></s><s class="bar"></s><span class="text">找同款</span></a><a rel="noreferrer" class="btn " target="_blank" href="/search?type=similar&app=i2i&rec_type=1&nid='+num_iid+'" data-spm-anchor-id="a230r.1.14.376"><s class="shim"></s><span class="text">找相似</span></a></div><div class="report"><a rel="noreferrer" href="//jubao.taobao.com/index.htm?spm=a230r.1.14.377.111979f8UDUiPq&amp;itemId='+num_iid+'" target="_blank" title="举报该宝贝" data-spm-anchor-id="a230r.1.14.377"><span class="icon-btn-report"></span></a></div></div></div><div class="ctx-box J_MouseEneterLeave J_IconMoreNew"><div class="row row-1 g-clearfix"><div class="price g_price g_price-highlight"><span>¥</span><strong>'+price_info+'</strong></div><div class="deal-cnt">'+volume+'人付款</div><div class="ship icon-service-free"></div></div><div class="row row-2 title"><a rel="noreferrer" id="J_Itemlist_TLink_'+num_iid+'" class="J_ClickStat" data-nid="'+num_iid+'" href="'+href+'" target="_blank" trace-nid="'+num_iid+'" data-spm-anchor-id="a230r.1.14.378"><span class="baoyou-intitle icon-service-free"></span>'+title+'</a></div><div class="row row-3 g-clearfix"><div class="shop"><a rel="noreferrer" class="shopname J_MouseEneterLeave J_ShopInfo" data-nid="'+num_iid+'" href="'+href+'" target="_blank" data-spm-anchor-id="a230r.1.14.379"><span class="dsrs"><span class="dsr morethan"></span><span class="dsr morethan"></span><span class="dsr morethan"></span></span><span>'+shop_title+'</span></a></div><div class="location">'+provcity+'</div></div><div class="row row-4 g-clearfix"><div class="feature-icons icon-has-more" id="J_Itemlist_Icons_'+num_iid+'"><ul class="icons">'+icon_str+'</ul></div><div class="wangwang"><span class="ww-light ww-small" data-nick="'+shop_title+'" data-display="inline" data-icon="small" data-encode="true"><a href="'+wangwang_url+'" target="_blank" class="ww-inline ww-online" title="点此可以直接和卖家交流选好的宝贝,或相互交流网购体验,还支持语音视频噢。"><span>旺旺在线</span></a></span></div></div></div></div>';
                });
                $('.m-itemlist .items').prepend('<div id="'+conId+'">'+s+'</div>');
                $('#mainsrp-pager .item').on('click',function () {
                    var page = $(this).text().trim();a(page);
                });
            });
        }
        aGet(1);
    }
}();
console 命令行工具 X clear

                    
>
console