VIP视频解析

解析并破解各大视频站的VIP权限

  1. // ==UserScript==
  2. // @name VIP视频解析
  3. // @name:en VIP Video
  4. // @namespace qiqisw
  5. // @version 1.8.8
  6. // @description 解析并破解各大视频站的VIP权限
  7. // @description:en Crack VIP permissions of some chinese video sites
  8. // @author qiqisw
  9. // @include *://v.qq.com/x/*
  10. // @include *://m.v.qq.com/*
  11. // @include *://*.mgtv.com/*b/*
  12. // @include *://*.le.com/ptv/vplay/*
  13. // @include *://m.le.com/*
  14. // @include *://v.youku.com/v_show/*
  15. // @include *://m.youku.com/video/*
  16. // @include *://*.iqiyi.com/v_*
  17. // @include *://*.iqiyi.com/dianying/*
  18. // @include *://*.tudou.com/albumplay/*
  19. // @include *://*.tudou.com/listplay/*
  20. // @include *://*.tudou.com/programs/view/*
  21. // @include *://*.wasu.cn/*Play/show/id/*
  22. // @include *://*tv.sohu.com/*
  23. // @include *://*film.sohu.com/album/*
  24. // @include *://ddp.vip.pptv.com/vod_detail/*
  25. // @include *://*.pptv.com/show/*
  26. // @include *://*.acfun.cn/v/*
  27. // @include *://*.fun.tv/vplay/*
  28. // @include *://vip.1905.com/play/*
  29. // @include *://vip.pptv.com/show/*
  30. // @include *://v.yinyuetai.com/video/*
  31. // @include *://v.yinyuetai.com/playlist/*
  32. // @include *://*.bilibili.com/video/*
  33. // @exclude *?url=*
  34. // @exclude *?qt=*
  35. // @exclude *?v=*
  36. // @grant GM_setValue
  37. // @grant GM_getValue
  38. // @grant GM_openInTab
  39. // @grant unsafeWindow
  40. // @grant GM_xmlhttpRequest
  41. // @license MIT License
  42. // @connect cache.video.qiyi.com
  43. // ==/UserScript==
  44. (function() {
  45. 'use strict';
  46. var cracks=[
  47. {name:"余温解析",url:"https://www.yunhot.cn/j/jiexi.php?url=%s",title:"首选"},
  48. ],video,videoWidth,videoHeight,i=0;
  49. var isMobile=function() {
  50. var userAgentInfo = navigator.userAgent.toLowerCase();
  51. var Agents=["android", "iphone",
  52. "symbianos", "windows phone",
  53. "ipad", "ipod" ,"midp" ,"ucweb"];
  54. var flag=false;
  55. for (var v=0; v < Agents.length; v++) {
  56. if (userAgentInfo.indexOf(Agents[v]) > 0) {
  57. flag=true;
  58. break;
  59. }
  60. }
  61. return flag;
  62. }();
  63. var iqiyi=location.hostname.indexOf("iqiyi.com")!=-1;
  64. var vipVideoCrackJump=GM_getValue(location.hostname+"_vipVideoCrackJump");
  65. var vipVideoCrackEmbed=GM_getValue("vipVideoCrackEmbed");
  66. var vipVideoCrackUrl=GM_getValue("vipVideoCrackUrl");
  67. var iframe=document.createElement("iframe");
  68. iframe.style.border="0";
  69. var selectStyle=document.createElement("style");
  70. selectStyle.innerHTML=".crackJump{font-size:12px;margin-left:5px;color:white;text-shadow:#000 1px 0 0,#000 0 1px 0,#000 -1px 0 0,#000 0 -1px 0;-webkit-text-shadow:#000 1px 0 0,#000 0 1px 0,#000 -1px 0 0,#000 0 -1px 0;-moz-text-shadow:#000 1px 0 0,#000 0 1px 0,#000 -1px 0 0,#000 0 -1px 0;*filter: Glow(color=#000, strength=1);}.crackJump input{vertical-align:middle;}.vipSelect{background:black;color:white;font-size:12px;border:none;}.crackArea{position:absolute;z-index:999999;left:0px;top:0px;opacity:0.50;filter:alpha(opacity=50);transition:opacity 0.3s ease,width 0.3s ease;width:18px;height:18px;overflow:hidden;white-space:nowrap;border:1px solid #666;background:black;}.crackArea:hover{opacity:1;filter:alpha(opacity=100);width:230px;}.crackArea>p{display:block;font-size:13px;text-align:center;float:left;position:absolute;top:0px;background-color:black;width:100%;height:100%;margin:0 auto}.crackArea:hover>p{display:none;}.crackArea>label{display:none;}.crackArea:hover>label{display:initial;}";
  71. document.getElementsByTagName("head")[0].appendChild(selectStyle);
  72. var placeholder=document.createElement("div");
  73. placeholder.style.cssText="width:100%;height:100%;text-align:center;font-size:x-large;cursor:pointer;color:#666;";
  74. placeholder.innerHTML="点击恢复视频播放";
  75. placeholder.addEventListener("click",function(){
  76. if(placeholder.parentNode){
  77. placeholder.parentNode.replaceChild(video,placeholder);
  78. }
  79. });
  80. var select=document.createElement("select");
  81. select.className="vipSelect";
  82. select.innerHTML="<option value=''>? VIP解析</option>";
  83. cracks.forEach(function(item){
  84. var optionStr="<option value='"+item.url+"'"+(item.title?"title='"+item.title+"'":"")+">"+item.name+"</option>";
  85. select.innerHTML+=optionStr;
  86. });
  87. select.onchange=function(){
  88. var value=select.options[select.options.selectedIndex].value;
  89. if(value){
  90. var url=value.replace("%s",(iqiyi&&location.href.indexOf("#")!=-1?decodeURIComponent(document.querySelector(".sns-icon>li>a").href.replace(/.*url=(.*)%3Fsrc.*/,"$1")):location.href));
  91. if(value.indexOf("hacg.user.js")!=-1){
  92. GM_setValue("hacgGodTurnVisited",true);
  93. select.options.remove(select.options.selectedIndex);
  94. }else{
  95. vipVideoCrackUrl=value;
  96. GM_setValue("vipVideoCrackUrl",vipVideoCrackUrl);
  97. if(video.parentNode)video.parentNode.replaceChild(placeholder,video);
  98. }
  99. if(!vipVideoCrackEmbed || !embedCrack(url)){
  100. unsafeWindow.open(url);
  101. }
  102. select.options.selectedIndex=0;
  103. }
  104. };
  105. var quickAccess=document.createElement("label");
  106. quickAccess.className="crackJump";
  107. quickAccess.title="立即利用上次选择的接口破解";
  108. quickAccess.innerHTML="<input type='checkbox'>立即破解";
  109. var jumpCheck=quickAccess.querySelector("input");
  110. jumpCheck.onclick=function(){
  111. vipVideoCrackJump=jumpCheck.checked;
  112. GM_setValue(location.hostname+"_vipVideoCrackJump",vipVideoCrackJump);
  113. crackJump();
  114. };
  115. var embedLabel=document.createElement("label");
  116. embedLabel.className="crackJump";
  117. embedLabel.title="能嵌入当前站点的接口就直接嵌入页面";
  118. embedLabel.innerHTML="<input type='checkbox'>能嵌就嵌";
  119. var embedCheck=embedLabel.querySelector("input");
  120. embedCheck.onclick=function(){
  121. vipVideoCrackEmbed=embedCheck.checked;
  122. GM_setValue("vipVideoCrackEmbed",vipVideoCrackEmbed);
  123. crackJump();
  124. };
  125. var showP=document.createElement("p");
  126. showP.innerHTML="?";
  127. var crackArea=document.createElement("div");
  128. crackArea.className="crackArea";
  129. crackArea.appendChild(select);
  130. crackArea.appendChild(showP);
  131. crackArea.appendChild(quickAccess);
  132. crackArea.appendChild(embedLabel);
  133. function crackJump(){
  134. if(vipVideoCrackJump){
  135. var value=vipVideoCrackUrl?vipVideoCrackUrl:cracks[0].url;
  136. var url=value.replace("%s",(iqiyi?location.href.replace(/#.*/,""):location.href));
  137. if(!vipVideoCrackEmbed || !embedCrack(url)){
  138. GM_openInTab(url,false);
  139. if(video.parentNode)video.parentNode.replaceChild(placeholder,video);
  140. }
  141. }
  142. }
  143. function embedCrack(url){
  144. var canEmbed=false;
  145. if(/^https/.test(url)){
  146. url=location.protocol+url.slice(6);
  147. canEmbed=true;
  148. }else if(location.protocol=="http:"){
  149. canEmbed=true;
  150. }
  151. var htmlVideo=document.querySelector("video");
  152. if(htmlVideo){
  153. var vi=setInterval(function(){
  154. if(htmlVideo.src){
  155. setTimeout(function() {
  156. htmlVideo.click();
  157. },1000);
  158. clearInterval(vi);
  159. }
  160. },500);
  161. }
  162. if(canEmbed){
  163. if(iqiyi){
  164. var plgcontainer=document.querySelector('[data-player-hook=plgcontainer]');
  165. var videoLoading=document.querySelector('[data-player-hook=videoLoading]');
  166. var isi=setInterval(function(){
  167. var jplayUnderFrame=document.querySelector('.J_play-underFrame');
  168. if(jplayUnderFrame){
  169. clearInterval(isi);
  170. var flashArea_paypop=document.querySelector('#flashArea_paypop');
  171. if(flashArea_paypop)flashArea_paypop.parentNode.parentNode.removeChild(flashArea_paypop.parentNode);
  172. jplayUnderFrame.parentNode.removeChild(jplayUnderFrame);
  173. }
  174. },500);
  175. if(plgcontainer)plgcontainer.parentNode.removeChild(plgcontainer);
  176. if(videoLoading)videoLoading.parentNode.removeChild(videoLoading);
  177. }
  178. iframe.width=videoWidth;
  179. iframe.height=videoHeight;
  180. iframe.src=url;
  181. if(!iframe.parentNode){
  182. if(video.parentNode){
  183. video.parentNode.replaceChild(iframe,video);
  184. }else{
  185. placeholder.parentNode.replaceChild(iframe,placeholder);
  186. }
  187. video=iframe;
  188. }
  189. }
  190. return canEmbed;
  191. }
  192. if(isMobile){
  193. crackArea.style.position="fixed";
  194. document.body.appendChild(crackArea);
  195. }else{
  196. var si=setInterval(function(){
  197. [].every.call(document.querySelectorAll("object,embed,video"),function(item){
  198. var style=unsafeWindow.getComputedStyle(item, null);
  199. if(style.width.replace("px","")>100 && style.height.replace("px","")>100){
  200. video=item;
  201. return false;
  202. }
  203. return true;
  204. });
  205. if(video){
  206. clearInterval(si);
  207. var videoStyle=unsafeWindow.getComputedStyle(video, null);
  208. videoWidth=videoStyle.width;
  209. videoHeight=videoStyle.height;
  210. var videoParent=video.parentNode;
  211. videoParent.appendChild(crackArea);
  212. placeholder.style.lineHeight=unsafeWindow.getComputedStyle(videoParent).height;
  213. if(location.hostname.indexOf("v.yinyuetai.com")!=-1){
  214. if (!/^https?:\/\/v\.yinyuetai\.com\/video\/h5\//.test(location.href)) {
  215. unsafeWindow.location.href = unsafeWindow.location.href.replace(/^https?:\/\/v\.yinyuetai\.com\/video\//,"http://v.yinyuetai.com/video/h5/");
  216. }else{
  217. videoParent.parentNode.style.position="absolute";
  218. setTimeout(function(){
  219. videoStyle=unsafeWindow.getComputedStyle(video, null);
  220. videoWidth=videoStyle.width;
  221. videoHeight=videoStyle.height;
  222. },1000);
  223. }
  224. }else if(location.hostname.indexOf("v.youku.com")!=-1){
  225. if(vipVideoCrackEmbed)videoHeight="580px";
  226. }else if(location.hostname.indexOf("le.com")!=-1){
  227. document.querySelector('.juji_cnt').addEventListener('click', function(e){
  228. if(!vipVideoCrackJump)return;
  229. var target=e.target;
  230. if(target.tagName!="A")return;
  231. location.href="http://www.le.com/ptv/vplay/"+target.getAttribute("data-vid")+".html";
  232. });
  233. }else if(iqiyi){
  234. document.querySelector('#widget-dramaseries').addEventListener('click', function(e){
  235. if(!vipVideoCrackJump)return;
  236. var target=e.target.parentNode.tagName=="LI"?e.target.parentNode:(e.target.parentNode.parentNode.tagName=="LI"?e.target.parentNode.parentNode:e.target.parentNode.parentNode.parentNode);
  237. if(target.tagName!="LI")return;
  238. GM_xmlhttpRequest({
  239. method: 'GET',
  240. url: "http://cache.video.qiyi.com/jp/vi/"+target.dataset.videolistTvid+"/"+target.dataset.videolistVid+"/?callback=crackIqiyi",
  241. onload: function(result) {
  242. var crackIqiyi=function(d){
  243. location.href=d.vu;
  244. };
  245. eval(result.responseText);
  246. }
  247. });
  248. });
  249. unsafeWindow.addEventListener("hashchange",function(){
  250. crackJump();
  251. });
  252. }
  253. if(vipVideoCrackJump){
  254. jumpCheck.checked=true;
  255. }
  256. if(vipVideoCrackEmbed){
  257. embedCheck.checked=true;
  258. }
  259. crackJump();
  260. unsafeWindow.eval(`
  261. var pushState = window.history.pushState;
  262. window.history.pushState=function(a){
  263. window.postMessage("pushState","*");
  264. return pushState.apply(history, arguments);
  265. };
  266. var replaceState = window.history.pushState;
  267. window.history.replaceState=function(a){
  268. window.postMessage("replaceState","*");
  269. return pushState.apply(history, arguments);
  270. };`);
  271. unsafeWindow.addEventListener('message',function(e) {
  272. if(e.data=="pushState" || e.data=="replaceState"){
  273. setTimeout(function(){crackJump();},1);
  274. }
  275. });
  276. }
  277. },500);
  278. setTimeout(function(){
  279. clearInterval(si);
  280. },20000);
  281. }
  282. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址