mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 23:51:44 +00:00
build
This commit is contained in:
2
dist/primeMirror/posts.js
vendored
2
dist/primeMirror/posts.js
vendored
@@ -1 +1 @@
|
||||
"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,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of __getOwnPropNames(t))__hasOwnProp.call(e,s)||s===r||__defProp(e,s,{get:()=>t[s],enumerable:!(o=__getOwnPropDesc(t,s))||o.enumerable});return e},__toCommonJS=e=>__copyProps(__defProp({},"__esModule",{value:!0}),e),__async=(e,t,r)=>new Promise((o,s)=>{var n=e=>{try{a(r.next(e))}catch(e){s(e)}},i=e=>{try{a(r.throw(e))}catch(e){s(e)}},a=e=>e.done?o(e.value):Promise.resolve(e.value).then(n,i);a((r=r.apply(e,t)).next())}),posts_exports={};__export(posts_exports,{getPosts:()=>getPosts,getSearchPosts:()=>getSearchPosts});var getPosts=__name(function(e){return __async(this,arguments,function*({filter:e,page:t,providerValue:r,signal:o,providerContext:s}){try{const{getBaseUrl:n,cheerio:i}=s,a=yield n("nfMirror"),p=[];if(t>1)return[];const l=`https://netmirror.8man.dev/api/net-proxy?${"primeMirror"===r?"isPrime=true":"isPrime=false"}&url=${a+e}`,c=yield fetch(l,{signal:o,method:"GET",credentials:"omit"}),_=yield c.text(),d=i.load(_);return d("a.post-data").map((e,t)=>{const o=d(t).attr("data-post"),s=d(t).find("img").attr("data-src")||"";o&&p.push({title:"",link:a+""+("netflixMirror"===r?"/post.php?id=":"/pv/post.php?id=")+o+"&t="+Math.round((new Date).getTime()/1e3),image:s})}),p}catch(e){return[]}})},"getPosts"),getSearchPosts=__name(function(e){return __async(this,arguments,function*({searchQuery:e,page:t,providerValue:r,signal:o,providerContext:s}){var n;const{getBaseUrl:i}=s;try{if(t>1)return[];const s=[],a=yield i("nfMirror"),p=`https://netmirror.8man.dev/api/net-proxy?${"primeMirror"===r?"isPrime=true":"isPrime=false"}&url=${a}${"netflixMirror"===r?"":"/pv"}/search.php?s=${encodeURI(e)}`,l=yield fetch(p,{signal:o,method:"GET",credentials:"omit"}),c=yield l.json();return null==(n=null==c?void 0:c.searchResult)||n.forEach(e=>{const t=(null==e?void 0:e.t)||"",o=null==e?void 0:e.id,n="netflixMirror"===r?`https://imgcdn.media/poster/v/${o}.jpg`:`https://imgcdn.media/pv/341/${o}.jpg`;o&&s.push({title:t,link:a+""+("netflixMirror"===r?"/mobile/post.php?id=":"/mobile/pv/post.php?id=")+o+"&t="+Math.round((new Date).getTime()/1e3),image:n})}),s}catch(e){return[]}})},"getSearchPosts");exports.getPosts=getPosts,exports.getSearchPosts=getSearchPosts;
|
||||
"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__name=(target,value)=>__defProp(target,"name",{value:value,configurable:!0}),__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&"object"==typeof from||"function"==typeof from)for(let key of __getOwnPropNames(from))__hasOwnProp.call(to,key)||key===except||__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),__async=(__this,__arguments,generator)=>new Promise((resolve,reject)=>{var fulfilled=value=>{try{step(generator.next(value))}catch(e){reject(e)}},rejected=value=>{try{step(generator.throw(value))}catch(e){reject(e)}},step=x=>x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);step((generator=generator.apply(__this,__arguments)).next())}),posts_exports={};__export(posts_exports,{getPosts:()=>getPosts,getSearchPosts:()=>getSearchPosts});var getPosts=__name(function(_0){return __async(this,arguments,function*({filter:filter,page:page,providerValue:providerValue,signal:signal,providerContext:providerContext}){try{const{getBaseUrl:getBaseUrl,cheerio:cheerio}=providerContext,baseUrl=yield getBaseUrl("nfMirror"),catalog=[];if(page>1)return[];const url=`https://netmirror.8man.dev/api/net-proxy?${"primeMirror"===providerValue?"isPrime=true":"isPrime=false"}&url=${baseUrl+filter}`,res=yield fetch(url,{signal:signal,method:"GET",credentials:"omit"}),data=yield res.text(),$=cheerio.load(data);return $("a.post-data").map((i,element)=>{const id=$(element).attr("data-post"),image=$(element).find("img").attr("data-src")||"";id&&catalog.push({title:"",link:baseUrl+""+("netflixMirror"===providerValue?"/post.php?id=":"/pv/post.php?id=")+id+"&t="+Math.round((new Date).getTime()/1e3),image:image})}),catalog}catch(err){return console.error("nf error ",err),[]}})},"getPosts"),getSearchPosts=__name(function(_0){return __async(this,arguments,function*({searchQuery:searchQuery,page:page,providerValue:providerValue,signal:signal,providerContext:providerContext}){var _a;const{getBaseUrl:getBaseUrl}=providerContext;try{if(page>1)return[];const catalog=[],baseUrl=yield getBaseUrl("nfMirror"),url=`https://netmirror.8man.dev/api/net-proxy?${"primeMirror"===providerValue?"isPrime=true":"isPrime=false"}&url=${baseUrl}${"netflixMirror"===providerValue?"":"/pv"}/search.php?s=${encodeURI(searchQuery)}`,res=yield fetch(url,{signal:signal,method:"GET",credentials:"omit"}),data=yield res.json();return null==(_a=null==data?void 0:data.searchResult)||_a.forEach(result=>{const title=(null==result?void 0:result.t)||"",id=null==result?void 0:result.id,image="netflixMirror"===providerValue?`https://imgcdn.media/poster/v/${id}.jpg`:`https://imgcdn.media/pv/341/${id}.jpg`;id&&catalog.push({title:title,link:baseUrl+""+("netflixMirror"===providerValue?"/mobile/post.php?id=":"/mobile/pv/post.php?id=")+id+"&t="+Math.round((new Date).getTime()/1e3),image:image})}),catalog}catch(err){return console.error("Search error:",err),[]}})},"getSearchPosts");exports.getPosts=getPosts,exports.getSearchPosts=getSearchPosts;
|
||||
Reference in New Issue
Block a user