84669 人学习
152542 人学习
20005 人学习
5487 人学习
7821 人学习
359900 人学习
3350 人学习
180660 人学习
48569 人学习
18603 人学习
40936 人学习
1549 人学习
1183 人学习
32909 人学习
采集出来的代码
a.removeAttribute('src'); var obj = window.__getVideoWh(a), mydiv = document.createElement('img'); mydiv.className = "img_loading"; mydiv.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAABJRU5ErkJggg=="; mydiv.setAttribute("data- vid",vid); mydiv.style.cssText = "宽度: " + obj.w + "px !重要;高度: " + obj.h + "px !重要;"; a.style.display = "无"; insertAfter(mydiv,a); a.style.cssText += ";宽度: " + obj.w + " px !important;height: " + obj.h + "px !important;"; a.setAttribute("width",obj.w); a.setAttribute("height ",obj.h); a.setAttribute("data-vh",obj.vh); a.setAttribute("data-vw",obj.vw); a.setAttribute("src",location.protocol+"//v.qq.com/iframe/player.html?&auto=0"frameborder=0allowfullscreen></iframe></p> 微信的js里面的iframe代码(function(){ var iframe = document.getElementsByTagName('iframe'); for ( var i=0,il=iframe.length;ivar a = iframe[i]; var src_ = a.getAttribute('src')| |a.getAttribute('data-src')||""; if(!/http(s)*\:\/\/v\.qq\.com\/iframe\/(预览|播放器)\.html\?/.test(src_)){ 继续; } var vid = getQuery("vid",src_); if(!vid){ 继续; } vid=vid.replace(/^[\s\uFEFF\xA0]+ |[\s\uFEFF\xA0]+$/g,""); a.removeAttribute('src'); var obj = window.__getVideoWh(a), mydiv = document.createElement('img'); mydiv.className = "img_loading"; mydiv.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAABJRU5ErkJg gg ==>; mydiv.setAttribute("data-vid",vid); mydiv.style.cssText = "width: " + obj.w + "px !important;height: " + obj.h + "px !important;"; a.style.display = "none"; insertAfter(mydiv,a); a.style.cssText += ";width: " + obj.w + "px !important;height: " + obj.h + "px !important;"; a.setAttribute("width",obj.w); a.setAttribute("height",obj.h); a.setAttribute("data-vh",obj.vh); a.setAttribute("data-vw",obj.vw); a.setAttribute("data-src",location.protocol+"//v.qq.com/iframe/player.html?vid="+ vid + "&width="+obj.vw+"&height="+obj.vh+"&auto=0"); } })(); })(); 为什么会自动吧这串js代码采集过来了,有视频的时候就显示出来 没有视频的时候采集出来就是上面的代码 求解释
a.removeAttribute('src');
var obj = window.__getVideoWh(a),
mydiv = document.createElement('img');
mydiv.className = "img_loading"; mydiv.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAABJRU5ErkJggg==";
mydiv.setAttribute("data- vid",vid);
mydiv.style.cssText = "宽度: " + obj.w + "px !重要;高度: " + obj.h + "px !重要;";
a.style.display = "无";
insertAfter(mydiv,a);
a.style.cssText += ";宽度: " + obj.w + " px !important;height: " + obj.h + "px !important;";
a.setAttribute("width",obj.w);
a.setAttribute("height ",obj.h);
a.setAttribute("data-vh",obj.vh);
a.setAttribute("data-vw",obj.vw);
a.setAttribute("src",location.protocol+"//v.qq.com/iframe/player.html?&auto=0"frameborder=0allowfullscreen></iframe></p>
微信的js里面的iframe代码
(function(){
var iframe = document.getElementsByTagName('iframe');
for ( var i=0,il=iframe.length;ivar a = iframe[i]; var src_ = a.getAttribute('src')| |a.getAttribute('data-src')||""; if(!/http(s)*\:\/\/v\.qq\.com\/iframe\/(预览|播放器)\.html\?/.test(src_)){ 继续; } var vid = getQuery("vid",src_); if(!vid){ 继续; } vid=vid.replace(/^[\s\uFEFF\xA0]+ |[\s\uFEFF\xA0]+$/g,""); a.removeAttribute('src'); var obj = window.__getVideoWh(a), mydiv = document.createElement('img'); mydiv.className = "img_loading"; mydiv.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAABJRU5ErkJg gg ==>; mydiv.setAttribute("data-vid",vid); mydiv.style.cssText = "width: " + obj.w + "px !important;height: " + obj.h + "px !important;"; a.style.display = "none"; insertAfter(mydiv,a); a.style.cssText += ";width: " + obj.w + "px !important;height: " + obj.h + "px !important;"; a.setAttribute("width",obj.w); a.setAttribute("height",obj.h); a.setAttribute("data-vh",obj.vh); a.setAttribute("data-vw",obj.vw); a.setAttribute("data-src",location.protocol+"//v.qq.com/iframe/player.html?vid="+ vid + "&width="+obj.vw+"&height="+obj.vh+"&auto=0"); } })(); })(); 为什么会自动吧这串js代码采集过来了,有视频的时候就显示出来 没有视频的时候采集出来就是上面的代码 求解释
var a = iframe[i];
var src_ = a.getAttribute('src')| |a.getAttribute('data-src')||"";
if(!/http(s)*\:\/\/v\.qq\.com\/iframe\/(预览|播放器)\.html\?/.test(src_)){
继续;
}
var vid = getQuery("vid",src_);
if(!vid){
vid=vid.replace(/^[\s\uFEFF\xA0]+ |[\s\uFEFF\xA0]+$/g,"");
mydiv.className = "img_loading";
mydiv.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAABJRU5ErkJg gg ==>;
mydiv.setAttribute("data-vid",vid);
mydiv.style.cssText = "width: " + obj.w + "px !important;height: " + obj.h + "px !important;";
a.style.display = "none";
a.style.cssText += ";width: " + obj.w + "px !important;height: " + obj.h + "px !important;";
a.setAttribute("height",obj.h);
a.setAttribute("data-src",location.protocol+"//v.qq.com/iframe/player.html?vid="+ vid + "&width="+obj.vw+"&height="+obj.vh+"&auto=0");
})();
为什么会自动吧这串js代码采集过来了,有视频的时候就显示出来 没有视频的时候采集出来就是上面的代码 求解释
可以使用phpquery来处理采集过来的内容,,,
可以使用phpquery来处理采集过来的内容,,,