biliporxy.cirno9.link
Open in
urlscan Pro
2606:4700:3034::ac43:8c7e
Public Scan
URL:
https://biliporxy.cirno9.link/
Submission: On January 07 via api from US — Scanned from US
Submission: On January 07 via api from US — Scanned from US
Form analysis
0 forms found in the DOMText Content
BILIBILI视频反代 -------------------------------------------------------------------------------- 食用方法 > 注意:所有视频都是动态获取,即不能取出被删除作品的视频. > https://bili.hakurei.cc/video/{vid}/{p}/{quality} 参数值备注vidav号/bv号如av170001 / BV1gx411w7gzp分p号分p号-1 例如1p就是0,类推quality清晰度支持 [360,480,720,720+,1080],会自动降级, 例如这个视频只有360p那么你用1080也会返回360p的 返回(video/mp4) 特殊响应头 KeyValue备注X-Bili-VIDvid与请求参数一致X-Bili-CIDcid这个看不看得懂无所谓X-Bili-VID-URLvideo_url视频原始urlset-cookie自己看夹带私货 mp4格式视频本体,可以直接右键(长按)下载保存(文件名都重命名好了) 文件名格式: xxxxxxxxxx ${vid}-P${p+1}-${分p名}-CID${cid}_${视频宽}x${视频高}.mp4 > https://bili.hakurei.cc/video/{vid}/{p}/subtitle/list 用于获取该p下所有字幕 参数值备注vidav号/bv号如av170001 / BV1gx411w7gzp分p号分p号-1 例如1p就是0,类推 返回值参考 https://bili.hakurei.org.cn/video/av99999999/0/subtitle/list xxxxxxxxxx [ { "id": 24851346704826372, "lan": "zh-Hans", "lan_doc": "中文(简体)", "is_lock": false, "author_mid": 235720524, "subtitle_url": "//aisubtitle.hdslb.com/bfs/subtitle/2193b907fc8e9aadc49a6140a9d98c4abe80e056.json?auth_key=1691138927-4060bb1e253141cdbff867bfa7491694-0-e1fe7695434b6bec01ea0ecbba0e6e3f", "type": 0, "id_str": "24851346704826371", "ai_type": 0, "ai_status": 0 }, { "id": 24853007474622470, "lan": "ja", "lan_doc": "日语", "is_lock": false, "author_mid": 235720524, "subtitle_url": "//aisubtitle.hdslb.com/bfs/subtitle/8ee0549a3a4038026ec2f46cc1e620217aa28b49.json?auth_key=1691138927-a69378ae1a62488b85c4e7fe2e883f0e-0-2b9ba9289ebaefbea4bb3a113528cfcc", "type": 0, "id_str": "24853007474622471", "ai_type": 0, "ai_status": 0 } ] -------------------------------------------------------------------------------- > https://bili.hakurei.cc/video/{vid}/{p}/subtitle/{lang}/vtt webvtt格式字幕 参数值备注vidav号/bv号如av170001 / BV1gx411w7gzp分p号分p号-1 例如1p就是0,类推lang字幕语言对应于list[n].lan 如zh-Hans,ja 返回值参考 https://bili.hakurei.org.cn/video/av99999999/0/subtitle/zh-Hans/vtt xxxxxxxxxx WEBVTT 00:00:07.646 --> 00:00:12.449 各位!琪露诺的算术教室迎来⑨周年啦~ 00:00:12.476 --> 00:00:16.375 人家已经是大⑨生了!已经到达天才的境界了哦! 00:00:16.414 --> 00:00:17.750 确定不是留级吗 00:00:17.750 --> 00:00:20.074 就像走钢丝般逼近极限 00:00:20.112 --> 00:00:22.750 心跳加速 孤注一掷 00:00:22.750 --> 00:00:26.375 学分啊,毕业论文啊,怎么样都想完成 00:00:26.384 --> 00:00:29.024 出席天数还差一点达标,GO!GO! 00:00:29.127 --> 00:00:33.125 笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~ 00:00:33.189 --> 00:00:35.024 张口闭口就是笨蛋什么的烦死人啦! 00:00:35.062 --> 00:00:38.500 笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~ 00:00:38.578 --> 00:00:40.475 那样说的人脑子只会像个笨蛋啦! 00:00:40.549 --> 00:00:44.000 笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~ 00:00:44.049 --> 00:00:45.924 什么啊,够了!笨蛋 笨蛋 00:00:45.924 --> 00:00:48.225 笨蛋~笨蛋~笨蛋~笨蛋~ 00:00:48.278 --> 00:00:51.075 ⑨⑨⑨⑨⑨⑨⑨⑨⑨ 00:00:51.131 --> 00:00:53.600 从红魔馆到月球的火箭 00:00:53.646 --> 00:00:56.424 以秒速⑨万公里飞上天 00:00:56.467 --> 00:00:59.049 到了白玉楼有两个人下去 00:00:59.102 --> 00:01:01.924 那半个人都来不及上来 00:01:01.936 --> 00:01:04.549 八云一家起了抵抗意识 00:01:04.604 --> 00:01:07.650 把反击导弹都放了出来(轰隆) 00:01:07.690 --> 00:01:09.025 救命啊~救命啊~Erin~Erin~ 00:01:09.115 --> 00:01:10.275 还是逆天的咲夜乱扔飞刀 00:01:10.310 --> 00:01:12.825 用了时停才结束这段旅程 00:01:12.849 --> 00:01:18.724 没有名气就没有意义,这一切都记在心中 00:01:18.753 --> 00:01:23.325 身处幻想乡的中心 ①!②!⑨!!! 00:01:23.398 --> 00:01:28.950 黑暗的宇宙转个不停,地球也跟着转个不停 00:01:29.005 --> 00:01:32.500 两个圆圆的眼珠,都在盯着看 00:01:32.561 --> 00:01:34.575 好紧张好紧张,要爆炸啦~ 00:01:34.611 --> 00:01:39.611 题目接二连三,补考仍在继续 00:01:39.645 --> 00:01:44.875 在这结冰的教室中,无须在意寒冷的温度和停滞的时间啦~ 00:01:44.875 --> 00:01:45.950 别着急,慢慢来吧! 00:01:46.018 --> 00:01:49.875 笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~ 00:01:49.939 --> 00:01:51.599 kabadi~kabadi~kabadi~kabadi 00:01:51.639 --> 00:01:55.250 笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~ 00:01:55.307 --> 00:01:57.150 bakadi~bakadi~bakadi~bakadi~ 00:01:57.185 --> 00:02:00.700 笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~ 00:02:00.712 --> 00:02:03.224 啊 既然大家都这样我也就不管啦! 00:02:03.294 --> 00:02:05.150 笨蛋~笨蛋~笨蛋~笨蛋~ 00:02:05.170 --> 00:02:08.150 ⑨⑨⑨⑨⑨⑨⑨⑨ 00:02:08.193 --> 00:02:10.400 灵梦家的赛钱箱 00:02:10.451 --> 00:02:13.224 里面的钱被人洗劫一空 00:02:13.294 --> 00:02:16.375 永远亭的永琳(Erin!Erin!) 00:02:16.454 --> 00:02:18.699 为了查犯人来到神社 00:02:18.733 --> 00:02:21.400 通过防盗监控进行现场查证 00:02:21.452 --> 00:02:24.449 采集了指纹 顺带采集了昆虫(哎呀呀!) 00:02:24.543 --> 00:02:25.949 案件解决 驳倒了之前的论点 00:02:26.002 --> 00:02:27.150 一开始就没人来行窃嘛 00:02:27.154 --> 00:02:29.699 因为里面根本没有赛钱 00:02:29.730 --> 00:02:35.625 我可是超越常理的天才!IQ为⑨哦! 00:02:35.650 --> 00:02:39.949 把素数顺着数下去 ①!②!⑨!!! 00:02:40.049 --> 00:02:45.675 一边在嘿嘿地傻笑 一边又在哈哈大笑 00:02:45.706 --> 00:02:47.800 还想多玩一会儿 还没有满足呢~ 00:02:47.889 --> 00:02:51.474 居然过了⑨年了啊,这可是真的哦~ 00:02:51.499 --> 00:02:56.499 要是播放量超过⑨亿次 全世界的人都成了笨蛋 00:02:56.499 --> 00:03:00.150 那应该会充满和平吧 套用某个人的话 00:03:00.213 --> 00:03:02.724 “服务器的管理也真是有够辛苦的呢!” 00:03:02.807 --> 00:03:05.324 尽管总是被人当成笨蛋 00:03:05.415 --> 00:03:08.000 但你们不知道笨蛋与天才不过一纸之隔吗 00:03:08.062 --> 00:03:09.199 实在是没有办法呢 00:03:09.279 --> 00:03:13.500 因为人家这种情况,有时候总会也只会表现出笨蛋的一面啦!(笨蛋~笨蛋~) 00:03:13.585 --> 00:03:16.574 即使将所有的所有的所有的所有的所有的所有的睿智 00:03:16.646 --> 00:03:18.949 都集中都集中都集中都集中在一起 00:03:19.020 --> 00:03:22.025 人家的人家的人家的人家的人家的人家的结实的 00:03:22.090 --> 00:03:24.500 脑瓜子脑瓜子脑瓜子脑瓜子也无人能敌 00:03:24.551 --> 00:03:27.525 吃了早餐早餐早餐早餐早餐早餐的话 00:03:27.601 --> 00:03:29.900 就像扭住婴儿婴儿婴儿婴儿的手般 轻而易举 00:03:29.974 --> 00:03:33.099 人家是人家是人家是人家是人家是人家是完美无缺的 00:03:33.099 --> 00:03:35.349 也就是所谓的所谓的所谓的所谓的 Perfect! 00:03:35.421 --> 00:03:40.775 ⑨百亿兆万完美! 00:03:40.883 --> 00:03:46.625 没有名气就没有意义,这一切都记在心中 00:03:46.703 --> 00:03:51.449 身处幻想乡的中心 ①!②!⑨!!! 00:03:51.520 --> 00:03:54.550 黑暗的宇宙转个不停(天才!) 00:03:54.655 --> 00:03:57.349 地球也跟着转个不停(拼命的天才!) 00:03:57.425 --> 00:04:00.500 两个圆圆的眼珠,都在盯着看 00:04:00.630 --> 00:04:02.650 好紧张 好紧张 要爆炸啦! 00:04:02.763 --> 00:04:05.675 题目接二连三(天才!) 00:04:05.750 --> 00:04:08.400 补考仍然在继续(真正的天才!) 00:04:08.424 --> 00:04:12.949 在这结冰的教室里,无须在意寒冷的温度和停滞的时间啦~ 00:04:12.989 --> 00:04:14.050 别着急,慢慢来吧! 00:04:14.120 --> 00:04:18.024 笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~ 00:04:18.084 --> 00:04:20.324 都过了⑨年了怎么听到的还是同一句话 00:04:20.404 --> 00:04:23.625 笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~ 00:04:23.696 --> 00:04:25.524 那样说的人脑子才像个笨蛋啦! 00:04:25.600 --> 00:04:28.925 笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~ 00:04:29.036 --> 00:04:31.324 什么啊,够了!笨蛋 笨蛋 00:04:31.395 --> 00:04:33.024 笨蛋~笨蛋~笨蛋~笨蛋~ 00:04:33.082 --> 00:04:43.000 ⑨⑨⑨⑨⑨⑨⑨⑨ -------------------------------------------------------------------------------- > https://bili.hakurei.cc/video/{vid}/{p}/subtitle/{lang}/raw b站原始格式字幕 参数值备注vidav号/bv号如av170001 / BV1gx411w7gzp分p号分p号-1 例如1p就是0,类推lang字幕语言对应于list[n].lan 如zh-Hans,ja 返回值参考 https://bili.hakurei.org.cn/video/av99999999/0/subtitle/zh-Hans/raw xxxxxxxxxx { "font_size": 0.4, "font_color": "#FFFFFF", "background_alpha": 0.5, "background_color": "#9C27B0", "Stroke": "none", "body": [ { "from": 7.646928, "to": 12.45, "location": 2, "content": "各位!琪露诺的算术教室迎来⑨周年啦~" }, { "from": 12.476132, "to": 16.375, "location": 2, "content": "人家已经是大⑨生了!已经到达天才的境界了哦!" }, { "from": 16.414248, "to": 17.75, "location": 2, "content": "确定不是留级吗" }, { "from": 17.75, "to": 20.075, "location": 2, "content": "就像走钢丝般逼近极限" }, { "from": 20.112962, "to": 22.75, "location": 2, "content": "心跳加速 孤注一掷" }, { "from": 22.75, "to": 26.375, "location": 2, "content": "学分啊,毕业论文啊,怎么样都想完成" }, { "from": 26.384178, "to": 29.025, "location": 2, "content": "出席天数还差一点达标,GO!GO!" }, { "from": 29.127757, "to": 33.125, "location": 2, "content": "笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~" }, { "from": 33.189169, "to": 35.025, "location": 2, "content": "张口闭口就是笨蛋什么的烦死人啦!" }, { "from": 35.062221, "to": 38.5, "location": 2, "content": "笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~" }, { "from": 38.578422, "to": 40.475, "location": 2, "content": "那样说的人脑子只会像个笨蛋啦!" }, { "from": 40.549495, "to": 44, "location": 2, "content": "笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~" }, { "from": 44.05, "to": 45.925, "location": 2, "content": "什么啊,够了!笨蛋 笨蛋" }, { "from": 45.925, "to": 48.225, "location": 2, "content": "笨蛋~笨蛋~笨蛋~笨蛋~" }, { "from": 48.278541, "to": 51.075, "location": 2, "content": "⑨⑨⑨⑨⑨⑨⑨⑨⑨" }, { "from": 51.131372, "to": 53.6, "location": 2, "content": "从红魔馆到月球的火箭" }, { "from": 53.646696, "to": 56.425, "location": 2, "content": "以秒速⑨万公里飞上天" }, { "from": 56.467701, "to": 59.05, "location": 2, "content": "到了白玉楼有两个人下去" }, { "from": 59.102034, "to": 61.925, "location": 2, "content": "那半个人都来不及上来" }, { "from": 61.936888, "to": 64.55, "location": 2, "content": "八云一家起了抵抗意识" }, { "from": 64.604546, "to": 67.65, "location": 2, "content": "把反击导弹都放了出来(轰隆)" }, { "from": 67.690241, "to": 69.025, "location": 2, "content": "救命啊~救命啊~Erin~Erin~" }, { "from": 69.115574, "to": 70.275, "location": 2, "content": "还是逆天的咲夜乱扔飞刀" }, { "from": 70.310499, "to": 72.825, "location": 2, "content": "用了时停才结束这段旅程" }, { "from": 72.85, "to": 78.725, "location": 2, "content": "没有名气就没有意义,这一切都记在心中" }, { "from": 78.753829, "to": 83.325, "location": 2, "content": "身处幻想乡的中心 ①!②!⑨!!!" }, { "from": 83.39886, "to": 88.95, "location": 2, "content": "黑暗的宇宙转个不停,地球也跟着转个不停" }, { "from": 89.005982, "to": 92.5, "location": 2, "content": "两个圆圆的眼珠,都在盯着看" }, { "from": 92.561282, "to": 94.575, "location": 2, "content": "好紧张好紧张,要爆炸啦~" }, { "from": 94.611762, "to": 99.611762, "location": 2, "content": "题目接二连三,补考仍在继续" }, { "from": 99.645387, "to": 104.875, "location": 2, "content": "在这结冰的教室中,无须在意寒冷的温度和停滞的时间啦~" }, { "from": 104.875, "to": 105.95, "location": 2, "content": "别着急,慢慢来吧!" }, { "from": 106.018637, "to": 109.875, "location": 2, "content": "笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~" }, { "from": 109.939478, "to": 111.6, "location": 2, "content": "kabadi~kabadi~kabadi~kabadi" }, { "from": 111.639309, "to": 115.25, "location": 2, "content": "笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~" }, { "from": 115.307748, "to": 117.15, "location": 2, "content": "bakadi~bakadi~bakadi~bakadi~" }, { "from": 117.18528, "to": 120.7, "location": 2, "content": "笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~" }, { "from": 120.712995, "to": 123.225, "location": 2, "content": "啊 既然大家都这样我也就不管啦!" }, { "from": 123.294416, "to": 125.15, "location": 2, "content": "笨蛋~笨蛋~笨蛋~笨蛋~" }, { "from": 125.170309, "to": 128.15, "location": 2, "content": "⑨⑨⑨⑨⑨⑨⑨⑨" }, { "from": 128.193696, "to": 130.4, "location": 2, "content": "灵梦家的赛钱箱" }, { "from": 130.451267, "to": 133.225, "location": 2, "content": "里面的钱被人洗劫一空" }, { "from": 133.294226, "to": 136.375, "location": 2, "content": "永远亭的永琳(Erin!Erin!)" }, { "from": 136.45485, "to": 138.7, "location": 2, "content": "为了查犯人来到神社" }, { "from": 138.733014, "to": 141.4, "location": 2, "content": "通过防盗监控进行现场查证" }, { "from": 141.452785, "to": 144.45, "location": 2, "content": "采集了指纹 顺带采集了昆虫(哎呀呀!)" }, { "from": 144.543463, "to": 145.95, "location": 2, "content": "案件解决 驳倒了之前的论点" }, { "from": 146.002622, "to": 147.15, "location": 2, "content": "一开始就没人来行窃嘛" }, { "from": 147.154016, "to": 149.7, "location": 2, "content": "因为里面根本没有赛钱" }, { "from": 149.730872, "to": 155.625, "location": 2, "content": "我可是超越常理的天才!IQ为⑨哦!" }, { "from": 155.65, "to": 159.95, "location": 2, "content": "把素数顺着数下去 ①!②!⑨!!!" }, { "from": 160.049212, "to": 165.675, "location": 2, "content": "一边在嘿嘿地傻笑 一边又在哈哈大笑" }, { "from": 165.706464, "to": 167.8, "location": 2, "content": "还想多玩一会儿 还没有满足呢~" }, { "from": 167.889394, "to": 171.475, "location": 2, "content": "居然过了⑨年了啊,这可是真的哦~" }, { "from": 171.499754, "to": 176.499754, "location": 2, "content": "要是播放量超过⑨亿次 全世界的人都成了笨蛋" }, { "from": 176.499754, "to": 180.15, "location": 2, "content": "那应该会充满和平吧 套用某个人的话" }, { "from": 180.21395, "to": 182.725, "location": 2, "content": "“服务器的管理也真是有够辛苦的呢!”" }, { "from": 182.807489, "to": 185.325, "location": 2, "content": "尽管总是被人当成笨蛋" }, { "from": 185.41573, "to": 188, "location": 2, "content": "但你们不知道笨蛋与天才不过一纸之隔吗" }, { "from": 188.062563, "to": 189.2, "location": 2, "content": "实在是没有办法呢" }, { "from": 189.279274, "to": 193.5, "location": 2, "content": "因为人家这种情况,有时候总会也只会表现出笨蛋的一面啦!(笨蛋~笨蛋~)" }, { "from": 193.585696, "to": 196.575, "location": 2, "content": "即使将所有的所有的所有的所有的所有的所有的睿智" }, { "from": 196.646116, "to": 198.95, "location": 2, "content": "都集中都集中都集中都集中在一起" }, { "from": 199.02023, "to": 202.025, "location": 2, "content": "人家的人家的人家的人家的人家的人家的结实的" }, { "from": 202.090365, "to": 204.5, "location": 2, "content": "脑瓜子脑瓜子脑瓜子脑瓜子也无人能敌" }, { "from": 204.551346, "to": 207.525, "location": 2, "content": "吃了早餐早餐早餐早餐早餐早餐的话" }, { "from": 207.601072, "to": 209.9, "location": 2, "content": "就像扭住婴儿婴儿婴儿婴儿的手般 轻而易举" }, { "from": 209.975, "to": 213.1, "location": 2, "content": "人家是人家是人家是人家是人家是人家是完美无缺的" }, { "from": 213.1, "to": 215.35, "location": 2, "content": "也就是所谓的所谓的所谓的所谓的 Perfect!" }, { "from": 215.42169, "to": 220.775, "location": 2, "content": "⑨百亿兆万完美!" }, { "from": 220.883293, "to": 226.625, "location": 2, "content": "没有名气就没有意义,这一切都记在心中" }, { "from": 226.703389, "to": 231.45, "location": 2, "content": "身处幻想乡的中心 ①!②!⑨!!!" }, { "from": 231.520546, "to": 234.55, "location": 2, "content": "黑暗的宇宙转个不停(天才!)" }, { "from": 234.655701, "to": 237.35, "location": 2, "content": "地球也跟着转个不停(拼命的天才!)" }, { "from": 237.42503, "to": 240.5, "location": 2, "content": "两个圆圆的眼珠,都在盯着看" }, { "from": 240.630211, "to": 242.65, "location": 2, "content": "好紧张 好紧张 要爆炸啦!" }, { "from": 242.76396, "to": 245.675, "location": 2, "content": "题目接二连三(天才!)" }, { "from": 245.750289, "to": 248.4, "location": 2, "content": "补考仍然在继续(真正的天才!)" }, { "from": 248.424672, "to": 252.95, "location": 2, "content": "在这结冰的教室里,无须在意寒冷的温度和停滞的时间啦~" }, { "from": 252.98925, "to": 254.05, "location": 2, "content": "别着急,慢慢来吧!" }, { "from": 254.120446, "to": 258.025, "location": 2, "content": "笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~" }, { "from": 258.084, "to": 260.325, "location": 2, "content": "都过了⑨年了怎么听到的还是同一句话" }, { "from": 260.404805, "to": 263.625, "location": 2, "content": "笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~" }, { "from": 263.696505, "to": 265.525, "location": 2, "content": "那样说的人脑子才像个笨蛋啦!" }, { "from": 265.6, "to": 268.925, "location": 2, "content": "笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~笨蛋~" }, { "from": 269.03615, "to": 271.325, "location": 2, "content": "什么啊,够了!笨蛋 笨蛋" }, { "from": 271.395619, "to": 273.025, "location": 2, "content": "笨蛋~笨蛋~笨蛋~笨蛋~" }, { "from": 273.082725, "to": 283, "location": 2, "content": "⑨⑨⑨⑨⑨⑨⑨⑨" } ] } 举例: 一般bvid https://bili.hakurei.cc/video/BV1qx411c7Ln/0/480 使用了字幕 https://bili.hakurei.org.cn/video/BV1qx411c7Ln/0/subtitle/zh-Hans/vtt av号 https://bili.hakurei.cc/video/av99999999/0/720+ 使用了字幕 https://bili.hakurei.org.cn/video/av99999999/0/subtitle/zh-Hans/vtt 带分p(妖王警告!): P1:https://bili.hakurei.cc/video/av170001/0/1080 P2:https://bili.hakurei.cc/video/av170001/1/1080 P3:https://bili.hakurei.cc/video/av170001/2/1080 依次类推 还有一个 xxxxxxxxxx https://bili.hakurei.cc/video/{vid}/{p}/{quality}/link 返回视频原始链接,不过b站有防盗链不能直接用 本来还想做个重定向的,不过貌似cf pages做不出来() -------------------------------------------------------------------------------- 自行搭建(源码) Cloudflare pages: functions/video/[vid]/[p]/[qual].js xxxxxxxxxx export async function onRequest(context) { let params = context.params let vid = params.vid let is_bvid if(vid.startsWith('BV')){ is_bvid=true } else if(vid.startsWith('av') || vid.startsWith('AV')) { is_bvid=false vid = vid.slice(2) //去除av号开头的av } else { return new Response(`Uknown video id type for ${vid}, only support [av,AV,BV].`) } let qual = { '360': 16, '480': 32, '720': 64, '720+': 74, '1080': 80, '1080+': 112, '4k': 120, 'hdr': 125, 'dolby': 126, '8k': 127 }[params.qual] let page_id = Number.parseInt(params.p) if (Number.isNaN(page_id)) { return new Response(`pageNum ${page_id} is not a number!`) } if (qual > 80 || qual == undefined){ return new Response("quality not supported,only support [360,480,720,720+,1080]!") } let video_info = await (await fetch(buildBiliReq(`https://api.bilibili.com/x/player/pagelist?${is_bvid ? 'bvid' : 'aid'}=${vid}`))).json() if (video_info.code != 0) { return new Response(`BiliApi error: returned code ${video_info.code},message: ${video_info.message}`) } let page = video_info.data[page_id] if (page == undefined) { return new Response(`pageNum out of range: requested p${page_id+1} but only have p${video_info.data.length}!`) } let cid = page.cid let playurl_info = await (await fetch(buildBiliReq(`https://api.bilibili.com/x/player/playurl?${is_bvid ? 'bvid' : 'avid'}=${vid}&cid=${cid}&qn=${qual}&fnval=1&fnver=0&platform=pc`))).json() if (playurl_info.code != 0) { return new Response(`BiliApi error: getstream returned code ${playurl_info.code},message: ${playurl_info.message}`) } let video_url = playurl_info.data.durl[0].url let video_file_name = `${vid}-P${page_id+1}-${page.part}-CID${cid}_${page.dimension.width}x${page.dimension.height}.mp4` let video_response = await fetch(buildBiliReq(video_url,{'Range':context.request.headers.Range})) let fin_video_response = new Response(video_response.body,video_response) fin_video_response.headers.set('Access-Control-Allow-Origin', '*') fin_video_response.headers.set('X-Bili-CID', cid) fin_video_response.headers.set('X-Bili-VID', vid) fin_video_response.headers.set('X-Bili-VID-URL', video_url) fin_video_response.headers.set('Content-Disposition', `inline; filename="${video_file_name}"`) fin_video_response.headers.set('set-cookie', "The_Cutest_Miko_Chan_In_The_World=Reimu Hakurei!;") return fin_video_response } function buildBiliReq(url,custonHeaders) { return new Request(url, { headers:Object.assign({ 'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', 'accept-language': 'zh-CN, zh', 'cache-control': 'no-cache', 'dnt': '1', 'pragma': 'no-cache', 'sec-ch-ua': '" Not A;Brand"v = "99", "Chromium"v = "96", "Microsoft Edge"v = "96"', 'sec-ch-ua-mobile': '?0', 'sec-ch-ua-platform': '"Linux"', 'sec-fetch-dest': 'document', 'sec-fetch-mode': 'navigate', 'sec-fetch-site': 'none', 'sec-fetch-user': '?1', 'Referer':'https://www.bilibili.com/', 'Cookie': '换成自己小号的cookie', 'User-Agent': 'Mozilla/5.0 (X11; Linux) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 Edg/96.0.1054.62', },custonHeaders) }); } -------------------------------------------------------------------------------- 来看灵梦~~ PID:81554929 P1. -------------------------------------------------------------------------------- (c) 2023 薄利神社 ,Powered by Cloudflare Pages.