PageSourceSearch

https://www.ottohub.cn/assets/videoApi--uK-Udm0.js

js ottohub.cn collected 2026-10-06 13:14:40 UTC 1,797 bytes, 1 lines download raw bytes

1import{l as e,o as t,s as n,u as r}from"./apiResponse-C8fEm_-L.js";var i=2,a={error_vid:`无效的视频ID`,error_uid:`无效的用户ID`,error_type:`参数类型错误`,system_error:`系统错误,请稍后重试`,too_many_requests:`请求过于频繁,请稍后再试`,too_big_num:`请求数量过大`};function o(e){return new Promise(t=>{window.setTimeout(t,e)})}function s(e){return e.includes(`请稍后`)?e:`${e},请稍后重试`}function c(e,t){if(e&&(e.status===408||e.status===429||e.status>=500))return!0;let n=t.toLowerCase();return n.includes(`failed to fetch`)||n.includes(`networkerror`)||n.includes(`network`)||n.includes(`暂时不可用`)||n.includes(`网关`)||n.includes(`gateway`)||n.includes(`unavailable`)||n.includes(`稍后重试`)}function l(e){if(!e||typeof e!=`object`)return[];let t=e;if(t.status===`error`)return[];let n=t.data;if(n&&typeof n==`object`&&!Array.isArray(n)){let e=n.video_list;if(Array.isArray(e))return e}return Array.isArray(n)?n:Array.isArray(t.video_list)?t.video_list:[]}async function u(e,r=`获取视频失败`){let l=s(r);for(let u=0;u<=i;u++)try{let d=await fetch(e,{cache:`no-store`}),f=await t(d),p=n(d,f,{messages:a,fallback:r});if(!p&&f!=null)return{ok:!0,data:f};if(l=p??s(r),u<i&&c(d,l)){await o(400*(u+1));continue}return{ok:!1,message:l}}catch{if(l=s(r),u<i){await o(400*(u+1));continue}return{ok:!1,message:l}}return{ok:!1,message:l}}async function d(e,t=`获取视频失败`){let n=await u(e,t);return n.ok?{ok:!0,list:l(n.data)}:n}function f(t,n,r){return e(`/api/video/recommend`,{offset:t,num:n,token:r})}function p(t={}){let{timeLimit:n=7,timeStart:i,offset:a=0,num:o=20,token:s}=t;return e(`/api/video/popular`,r({time_limit:n,...i!=null&&i>0?{time_start:i}:{},offset:a,num:o},s))}export{l as a,u as i,f as n,d as r,p as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.