mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
1 line
675 B
JavaScript
1 line
675 B
JavaScript
(()=>{return(t,a)=>{const i=async(t,i)=>{const e=await Ajax.getJsonWithCredentials(`https://api.bilibili.com/x/web-interface/ranking/index?day=${t}`);if(getUID()&&i===undefined){const{getWatchlaterList:t}=await a.importAsync("watchlater-api");i=await t()}if(e.code!==0){throw new Error(e.message)}return e.data.map(a=>({id:a.aid+"-"+t,aid:parseInt(a.aid),title:a.title,upID:a.mid,upName:a.author,coverUrl:a.pic.replace("http://","https://"),description:a.description,durationText:a.duration,playCount:formatCount(a.play),coins:formatCount(a.coins),favorites:formatCount(a.favorites),watchlater:i?i.includes(parseInt(a.aid)):null}))};return{export:{getTrendingVideos:i}}}})(); |