mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-18 08:01:43 +00:00
1 line
3.3 KiB
JavaScript
1 line
3.3 KiB
JavaScript
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__name=(e,t)=>__defProp(e,"name",{value:t,configurable:!0}),__export=(e,t)=>{for(var r in t)__defProp(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of __getOwnPropNames(t))__hasOwnProp.call(e,o)||o===r||__defProp(e,o,{get:()=>t[o],enumerable:!(n=__getOwnPropDesc(t,o))||n.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),__async=(e,t,r)=>new Promise((n,o)=>{var a=e=>{try{c(r.next(e))}catch(e){o(e)}},i=e=>{try{c(r.throw(e))}catch(e){o(e)}},c=e=>e.done?n(e.value):Promise.resolve(e.value).then(a,i);c((r=r.apply(e,t)).next())}),stream_exports={};__export(stream_exports,{getStream:()=>getStream});var getStream=__name(function(e){return __async(this,arguments,function*({link:e,type:t,providerContext:r}){var n,o,a,i,c,s;const{axios:p,cheerio:l}=r;try{const t=e.split("/").slice(0,3).join("/"),r=[],_=[],d=(yield p.get(e)).data,g=l.load(d);g('tr:contains("mixdrop")').map((e,r)=>{const n=g(r).find(".wp-menu-btn").attr("data-wp-menu"),o=g(r).find(".wp-menu-btn").next().text();n&&_.push({id:t+"/links/go/"+n,size:o})});for(const e of _){const t=yield p.head(e.id),l=null==(n=t.request)?void 0:n.responseURL.replace("/f/","/e/"),_=yield fetch(l,{credentials:"include",headers:{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0",Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8","Accept-Language":"en-US,en;q=0.5","Upgrade-Insecure-Requests":"1","Sec-Fetch-Dest":"iframe","Sec-Fetch-Mode":"navigate","Sec-Fetch-Site":"same-origin",Pragma:"no-cache","Cache-Control":"no-cache",referer:null==(o=t.request)?void 0:o.responseURL},referrer:null==(a=t.request)?void 0:a.responseURL,method:"GET",mode:"cors"}),d=yield _.text();var m=/eval\(function\((.*?)\)\{.*?return p\}.*?\('(.*?)'\.split/.exec(d);let g="";if(m){var u=m[2];const n=Number(u.split(",'|MDCore|")[0].split(",")[u.split(",'|MDCore|")[0].split(",").length-1]);g=null==(i=u.split(`',${n},`))?void 0:i[0].trim();let o=n,a=u.split(`',${n},`)[1].slice(2).split("|").length,p=u.split(`',${n},`)[1].slice(2).split("|");const l="https:"+(null==(c=__name(function(e,t,r,n,o,a){if(o=__name(function(e){return e.toString(36)},"e"),!"".replace(/^/,String)){for(;r--;)a[r.toString(t)]=n[r]||r.toString(t);n=[function(e){return a[e]}],o=__name(function(){return"\\w+"},"e"),r=1}for(;r--;)n[r]&&(e=e.replace(new RegExp("\\b"+o(r)+"\\b","g"),n[r]));return e},"decode")(g,o,a,p,0,{}).match(/MDCore\.wurl="([^"]+)"/))?void 0:c[1]);r.push({server:"Mixdrop "+e.size,link:l,type:"mp4",headers:{"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0",Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8","Accept-Language":"en-US,en;q=0.5","Upgrade-Insecure-Requests":"1","Sec-Fetch-Dest":"iframe","Sec-Fetch-Mode":"navigate","Sec-Fetch-Site":"same-origin",Pragma:"no-cache","Cache-Control":"no-cache",referer:null==(s=t.request)?void 0:s.responseURL}})}}return r}catch(e){return[]}})},"getStream");exports.getStream=getStream; |