From 636033fa57870a53b5465f472eb813ad8f8fc1e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=91=98=E5=B0=8F=E5=A2=A8?= <2291200076@qq.com> Date: Fri, 29 Jul 2022 17:37:56 +0800 Subject: [PATCH] =?UTF-8?q?B=E7=AB=99=E7=83=AD=E6=90=9C=E6=A6=9C=E5=8D=95?= =?UTF-8?q?=E5=88=9D=E6=AD=A5=E5=AE=8C=E6=88=90=EF=BC=9B=E7=BD=91=E9=A1=B5?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E8=B7=9F=E9=9A=8F=E5=AD=90iframe=E5=8F=98?= =?UTF-8?q?=E5=8C=96=E8=80=8C=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/bilibili_rank.html | 172 +++++++++++++++++++++++++--------------- index.html | 24 +++--- 2 files changed, 123 insertions(+), 73 deletions(-) diff --git a/html/bilibili_rank.html b/html/bilibili_rank.html index dfb9105..b555643 100644 --- a/html/bilibili_rank.html +++ b/html/bilibili_rank.html @@ -5,13 +5,29 @@ - 微博热搜 + B站排行 +
-

微博热搜榜

+

B站排行榜(调整中)

+


显示字段: @@ -201,7 +217,7 @@ function getData() { var xhr = new XMLHttpRequest(); - xhr.open("GET", "../data/weibo-hotband/latest.json?t=" + Date.now(), true); + xhr.open("GET", "../data/bilibili-rank/latest.json?t=" + Date.now(), true); xhr.send(); xhr.onreadystatechange = function () { if (xhr.readyState !== 4) return; @@ -218,6 +234,9 @@ } console.log(hotBandData); + // 更新动态 note + document.getElementById("dynamic-note").innerHTML = hotBandData.note; + // 更新时间 document.getElementById("latestUpdateTime").innerHTML = "数据拉取时间:" + new Date().toLocaleString() + "
" + @@ -243,15 +262,37 @@ // 渲染表格 str.push(` + 编号 - 热搜 - ${showEmoticon.checked ? "表情" : ""} - ${showNum.checked ? '热度
(展示/真实)' : ""} - ${showCategory.checked ? "分类" : ""} - ${showOnboardTime.checked ? "上线时间" : ""} - ${showIsNew.checked ? "是否新热搜" : ""} - ${showDetail.checked ? "热搜详情" : ""} - ${showMid.checked ? "mid" : ""} + aid + videos + tid + tname + copyright + pic + title + pubdate + ctime + desc + state + duration + mission_id + rights + owner + stat + dynamic + cid + dimension + short_link + short_link_v2 + first_frame + pub_location + bvid + score + + season_id + up_from_v2 + others `); str.push(``); @@ -261,60 +302,63 @@ str.push(` ${i + 1} + + ${hotBand.aid} + + ${hotBand.videos} + + ${hotBand.tid} + + ${hotBand.tname} + + ${hotBand.copyright} + + ${hotBand.pic} + + ${hotBand.title} + + ${hotBand.pubdate} + + ${hotBand.ctime} + + ${hotBand.desc} + + ${hotBand.state} + + ${hotBand.duration} + + ${hotBand.mission_id} + + ${JSON.stringify(hotBand.rights)} + + ${JSON.stringify(hotBand.owner)} + + ${JSON.stringify(hotBand.stat)} + + ${hotBand.dynamic} + + ${hotBand.cid} + + ${JSON.stringify(hotBand.dimension)} + + ${hotBand.short_link} + + ${hotBand.short_link_v2} + + ${hotBand.first_frame} + + ${hotBand.pub_location} + + ${hotBand.bvid} + + ${hotBand.score} - - - -
- ${hotBand.label_name} -
- ${hotBand.word} -
- - - ${showEmoticon.checked ? ` - - ${hotBand.emoticon} - ` : ""} - - ${showNum.checked ? ` - - - ${hotDelta == 0 ? hotBand.num : `${hotBand.num} / ${hotBand.raw_hot}`}
- - - ${hotDelta != 0 ? `(官方调控 ${hotDelta > 0 ? "+" : ""}${hotDelta})` : ""} - - - - ` : ""} - - ${showCategory.checked ? ` - - ${hotBand.category.map((c) => `${c}`).join(';')} - ` : ""} - - ${showOnboardTime.checked ? ` - - ${new Date(hotBand.onboard_time * 1000).toLocaleString()} - ` : ""} - - ${showIsNew.checked ? ` - - ${hotBand.more.is_new == 1 ? "是" : ""} - ` : ""} - - ${showDetail.checked ? ` - - -
${hotBand.more.detail}
- - ` : ""} - - ${showMid.checked ? ` - - ${hotBand.more.mid} - ` : ""} + + ${hotBand.season_id} + + ${hotBand.up_from_v2} + + ${JSON.stringify(hotBand.others)} `); } str.push(``); diff --git a/index.html b/index.html index 579413b..6d7b335 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ - 微博热搜 + 热搜榜单