返回提交历史
Modified
docs/video/recommend.md
+497
-2
XFEstudio/bilibili-API-collect
Add short video recommend api (#959)
* Update recommend.md * Update recommend.md
12af012
代码差异
1 个文件
+497
-2
@@ -2,7 +2,7 @@
2
2
3
3
- [获取单视频推荐列表(web端)](#获取单视频推荐列表(web端))
4
4
- [获取首页视频推荐列表(web端)](#获取首页视频推荐列表(web端))
5
5
- [获取短视频模式视频列表](#获取短视频模式视频列表)
6
6
---
7
7
8
8
## 获取单视频推荐列表(web端)
@@ -409,4 +409,499 @@ curl -G 'https://api.bilibili.com/x/web-interface/index/top/rcmd' \
409
409
}
410
410
```
411
411
412
</details>
412
</details>
413
414
415
## 获取短视频模式视频列表
416
417
> https://app.bilibili.com/x/v2/feed/index
418
419
*请求方式:GET*
420
421
认证方式:Cookie(SESSDATA)
422
423
**url参数:**
424
425
有大量不明意义的参数 备注仅供参考
426
427
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
428
|--------------|-----|---------------------------|-----|------------------------------|
429
| fnval | num | 视频流格式标识 | 非必要 | 默认为272 |
430
| fnver | num | 视频流版本标识 | 非必要 | 恒为1 |
431
| force_host | num | 源url类型 | 非必要 | 0:无限制 1:使用http 2:使用https |
432
| fourk | num | 是否允许 4K 视频 | 非必要 | 画质最高 1080P:0(默认)<br />画质最高 4K:1 |
433
| guidance | num | 0 | 非必要 | |
434
| https_url_req | num | 0 | 非必要 | |
435
| inline_danmu | num | 2 | 非必要 | |
436
| inline_sound | num | 1 | 非必要 | |
437
| interest_id | num | 0 | 非必要 | |
438
| login_event | num | 登录状态 | 非必要 | 0为登录 1为未登录 |
439
| mobi_app | num | android | 非必要 | 设备类型 |
440
| network | num | wifi | 非必要 | 网络类型 |
441
| open_event | num | | 非必要 | |
442
| platform | num | android | 非必要 | 设备类型 |
443
| pull | boll | false | 非必要 | |
444
| qn | num | 32 | 非必要 | 似乎是画质 |
445
| recsys_mode | num | 0 | 非必要 | |
446
| s_locale | str | zh_CN | 非必要 | 语言 |
447
| video_mode | num | 1 | 非必要 | |
448
| voice_balance | num | 音量均衡? | 非必要 | 默认为1 |
449
450
451
**json回复:**
452
453
根对象:
454
455
| 字段 | 类型 | 内容 | 备注 |
456
|-------------|-------|------|----------------------|
457
| code | num | 返回值 | 0:成功 |
458
| message | str | 错误信息 | 默认为0 |
459
| ttl | num | 1 | |
460
| data | obj | | |
461
462
463
`data`对象:
464
465
| 字段 | 类型 | 内容 | 备注 |
466
|-------------|-------|------|----------------------|
467
| config | obj | 一些界面相关的内容 | 此处省略 |
468
| items | array | 视频列表 | |
469
470
`data`中的`items`数组的对象:
471
472
以下为视频类型
473
474
| 字段 | 类型 | 内容 | 备注 |
475
|-------------|-------|------|----------------------|
476
| can_play | num | 1 | 字面意思 |
477
| card_goto | str | av | |
478
| card_type | str | 卡片类型 | 视频为small_cover_v2 |
479
| cover | str | 封面url | |
480
| cover_left_1_content_description | str | 播放量 | 8.9万观看 |
481
| cover_left_2_content_description | str | 弹幕数 | 250弹幕 |
482
| cover_left_text_1 | str | 播放量 | 8.9万 |
483
| cover_left_text_2 | str | 弹幕数 | 250 |
484
| cover_right_content_description | str | 视频长度 | 1分钟20秒 |
485
| cover_right_text | str | 视频长度 | 1:20 |
486
| desc_button | obj | up主信息 | |
487
| param | str | 视频aid | |
488
| player_args | obj | 视频信息 | |
489
| talk_back | str | | |
490
| title | str | 标题 | |
491
| uri | str | 跳转链接 | |
492
493
`desc_button`对象:
494
495
| 字段 | 类型 | 内容 | 备注 |
496
|-------------|-------|------|----------------------|
497
| event | str | | |
498
| text | str | up名称 | |
499
| type | num | 1 | |
500
| uri | str | 跳转链接 | |
501
502
503
`player_args`对象:
504
505
| 字段 | 类型 | 内容 | 备注 |
506
|-------------|-------|------|----------------------|
507
| aid | num | 视频aid | |
508
| cid | num | 视频cid | |
509
| duration | num | 视频长度 | 秒数 |
510
| type | str | | |
511
512
513
**示例:**
514
515
获取短视频模式视频列表
516
517
```shell
518
curl -G 'https://app.bilibili.com/x/v2/feed/index'
519
```
520
521
<details>
522
<summary>查看响应示例:</summary>
523
524
```json
525
{
526
"code": 0,
527
"message": "0",
528
"ttl": 1,
529
"data": {
530
"items": [
531
{
532
"card_type": "small_cover_v2",
533
"card_goto": "av",
534
"goto": "av",
535
"param": "411978753",
536
"cover": "http://i2.hdslb.com/bfs/archive/a1bda1e57e6812ca8822a8839fc4a1d3539255a8.jpg",
537
"title": "帕 鲁 现 状",
538
"uri": "bilibili://video/411978753?cid=1423365216\u0026player_height=1920\u0026player_preload=%7B%22cid%22%3A1423365216%2C%22expire_time%22%3A1706633200%2C%22file_info%22%3A%7B%2216%22%3A%5B%7B%22timelength%22%3A79970%2C%22filesize%22%3A3782665%7D%5D%2C%2264%22%3A%5B%7B%22timelength%22%3A79900%2C%22filesize%22%3A9552030%7D%5D%7D%2C%22support_quality%22%3Anull%2C%22support_formats%22%3Anull%2C%22support_description%22%3Anull%2C%22quality%22%3A16%2C%22url%22%3A%22http%3A%2F%2Fcn-gdst-cm-01-12.bilivideo.com%2Fupgcxcode%2F16%2F52%2F1423365216%2F1423365216-1-16.mp4%3Fe%3Dig8euxZM2rNcNbRVhwdVhwdlhWdVhwdVhoNvNC8BqJIzNbfqXBvEuENvNC8aNEVEtEvE9IMvXBvE2ENvNCImNEVEIj0Y2J_aug859r1qXg8gNEVE5XREto8z5JZC2X2gkX5L5F1eTX1jkXlsTXHeux_f2o859IB_%5Cu0026uipk%3D5%5Cu0026nbs%3D1%5Cu0026deadline%3D1706636800%5Cu0026gen%3Dplayurlv2%5Cu0026os%3Dbcache%5Cu0026oi%3D0%5Cu0026trid%3D00000ccc07d4b7a34140a25493d51003bd95U%5Cu0026mid%3D0%5Cu0026platform%3D%5Cu0026upsig%3D2bf8e99202a181300981ab6ba9d2305d%5Cu0026uparams%3De%2Cuipk%2Cnbs%2Cdeadline%2Cgen%2Cos%2Coi%2Ctrid%2Cmid%2Cplatform%5Cu0026cdnid%3D6876%5Cu0026bvc%3Dvod%5Cu0026nettype%3D0%5Cu0026orderid%3D0%2C3%5Cu0026buvid%3D%5Cu0026build%3D0%5Cu0026f%3DU_0_0%5Cu0026bw%3D47881%5Cu0026logo%3D80000000%22%2C%22video_codecid%22%3A7%2C%22video_project%22%3Atrue%2C%22fnver%22%3A0%2C%22fnval%22%3A0%7D\u0026player_rotate=0\u0026player_width=1080\u0026report_flow_data=%7B%22flow_card_type%22%3A%22av%22%7D",
539
"three_point": {
540
"dislike_reasons": [
541
{
542
"id": 4,
543
"name": "UP主:锤子game",
544
"toast": "将减少相似内容推荐"
545
},
546
{
547
"id": 2,
548
"name": "分区:网络游戏",
549
"toast": "将减少相似内容推荐"
550
},
551
{
552
"id": 3,
553
"name": "频道:搞笑",
554
"toast": "将减少相似内容推荐"
555
},
556
{
557
"id": 12,
558
"name": "此类内容过多",
559
"toast": "将减少相似内容推荐"
560
},
561
{
562
"id": 13,
563
"name": "推荐过",
564
"toast": "将减少相似内容推荐"
565
},
566
{
567
"id": 1,
568
"name": "不感兴趣",
569
"toast": "将减少相似内容推荐"
570
}
571
],
572
"feedbacks": [
573
{
574
"id": 1,
575
"name": "恐怖血腥",
576
"toast": "将优化首页此类内容"
577
},
578
{
579
"id": 2,
580
"name": "色情低俗",
581
"toast": "将优化首页此类内容"
582
},
583
{
584
"id": 3,
585
"name": "封面恶心",
586
"toast": "将优化首页此类内容"
587
},
588
{
589
"id": 4,
590
"name": "标题党/封面党",
591
"toast": "将优化首页此类内容"
592
}
593
],
594
"watch_later": 1
595
},
596
"args": {
597
"up_id": 495695169,
598
"up_name": "锤子game",
599
"rid": 65,
600
"rname": "网络游戏",
601
"tid": 1833,
602
"tname": "搞笑",
603
"aid": 411978753
604
},
605
"player_args": {
606
"aid": 411978753,
607
"cid": 1423365216,
608
"type": "av",
609
"duration": 80
610
},
611
"idx": 1706629610,
612
"three_point_v2": [
613
{
614
"title": "添加至稍后再看",
615
"type": "watch_later",
616
"icon": "https://i0.hdslb.com/bfs/activity-plat/static/ce06d65bc0a8d8aa2a463747ce2a4752/NyPAqcn0QF.png"
617
},
618
{
619
"title": "反馈",
620
"subtitle": "(选择后将优化首页此类内容)",
621
"reasons": [
622
{
623
"id": 1,
624
"name": "恐怖血腥",
625
"toast": "将优化首页此类内容"
626
},
627
{
628
"id": 2,
629
"name": "色情低俗",
630
"toast": "将优化首页此类内容"
631
},
632
{
633
"id": 3,
634
"name": "封面恶心",
635
"toast": "将优化首页此类内容"
636
},
637
{
638
"id": 4,
639
"name": "标题党/封面党",
640
"toast": "将优化首页此类内容"
641
}
642
],
643
"type": "feedback"
644
},
645
{
646
"title": "不感兴趣",
647
"subtitle": "(选择后将减少相似内容推荐)",
648
"reasons": [
649
{
650
"id": 4,
651
"name": "UP主:锤子game",
652
"toast": "将减少相似内容推荐"
653
},
654
{
655
"id": 2,
656
"name": "分区:网络游戏",
657
"toast": "将减少相似内容推荐"
658
},
659
{
660
"id": 3,
661
"name": "频道:搞笑",
662
"toast": "将减少相似内容推荐"
663
},
664
{
665
"id": 12,
666
"name": "此类内容过多",
667
"toast": "将减少相似内容推荐"
668
},
669
{
670
"id": 13,
671
"name": "推荐过",
672
"toast": "将减少相似内容推荐"
673
},
674
{
675
"id": 1,
676
"name": "不感兴趣",
677
"toast": "将减少相似内容推荐"
678
}
679
],
680
"type": "dislike"
681
}
682
],
683
"talk_back": "视频,帕 鲁 现 状,32.5万观看,257弹幕,时长1分钟20秒,UP主锤子game,",
684
"report_flow_data": "{\"flow_card_type\":\"av\"}",
685
"cover_left_text_1": "32.5万",
686
"cover_left_icon_1": 1,
687
"cover_left_1_content_description": "32.5万观看",
688
"cover_left_text_2": "257",
689
"cover_left_icon_2": 3,
690
"cover_left_2_content_description": "257弹幕",
691
"cover_right_text": "1:20",
692
"cover_right_content_description": "1分钟20秒",
693
"desc_button": {
694
"text": "锤子game",
695
"uri": "bilibili://space/495695169",
696
"event": "nickname",
697
"type": 1
698
},
699
"official_icon": 16,
700
"can_play": 1,
701
"goto_icon": {
702
"icon_url": "https://i0.hdslb.com/bfs/activity-plat/static/20230227/0977767b2e79d8ad0a36a731068a83d7/077GOeHOfO.png",
703
"icon_night_url": "https://i0.hdslb.com/bfs/activity-plat/static/20230227/0977767b2e79d8ad0a36a731068a83d7/ldbCXtkoK2.png",
704
"icon_width": 16,
705
"icon_height": 16
706
}
707
},
708
{
709
"card_type": "small_cover_v2",
710
"card_goto": "av",
711
"goto": "av",
712
"param": "836990443",
713
"cover": "http://i1.hdslb.com/bfs/archive/d16a125d6ec1c68cc9e0815bc28dcb62a1df9932.jpg",
714
"title": "【Phigros自制/崩坏:星穹铁道】欢迎来到匹诺康尼! 不眠之夜 IN Lv.13",
715
"uri": "bilibili://video/836990443?cid=1422516399\u0026player_height=1080\u0026player_preload=%7B%22cid%22%3A1422516399%2C%22expire_time%22%3A1706633200%2C%22file_info%22%3A%7B%2216%22%3A%5B%7B%22timelength%22%3A102818%2C%22filesize%22%3A4441802%7D%5D%2C%2264%22%3A%5B%7B%22timelength%22%3A102748%2C%22filesize%22%3A12468618%7D%5D%7D%2C%22support_quality%22%3Anull%2C%22support_formats%22%3Anull%2C%22support_description%22%3Anull%2C%22quality%22%3A16%2C%22url%22%3A%22http%3A%2F%2Fupos-sz-mirrorali.bilivideo.com%2Fupgcxcode%2F99%2F63%2F1422516399%2F1422516399-1-16.mp4%3Fe%3Dig8euxZM2rNcNbRVhwdVhwdlhWdVhwdVhoNvNC8BqJIzNbfqXBvEuENvNC8aNEVEtEvE9IMvXBvE2ENvNCImNEVEIj0Y2J_aug859r1qXg8gNEVE5XREto8z5JZC2X2gkX5L5F1eTX1jkXlsTXHeux_f2o859IB_%5Cu0026uipk%3D5%5Cu0026nbs%3D1%5Cu0026deadline%3D1706636800%5Cu0026gen%3Dplayurlv2%5Cu0026os%3Dalibv%5Cu0026oi%3D0%5Cu0026trid%3D0ccc07d4b7a34140a25493d51003bd95U%5Cu0026mid%3D0%5Cu0026platform%3D%5Cu0026upsig%3D06ea793aa573018646c0096adf0dcb9e%5Cu0026uparams%3De%2Cuipk%2Cnbs%2Cdeadline%2Cgen%2Cos%2Coi%2Ctrid%2Cmid%2Cplatform%5Cu0026bvc%3Dvod%5Cu0026nettype%3D0%5Cu0026orderid%3D0%2C3%5Cu0026buvid%3D%5Cu0026build%3D0%5Cu0026f%3DU_0_0%5Cu0026bw%3D43547%5Cu0026logo%3D80000000%22%2C%22video_codecid%22%3A7%2C%22video_project%22%3Atrue%2C%22fnver%22%3A0%2C%22fnval%22%3A0%7D\u0026player_rotate=0\u0026player_width=1920\u0026report_flow_data=%7B%22flow_card_type%22%3A%22av%22%7D",
716
"three_point": {
717
"dislike_reasons": [
718
{
719
"id": 4,
720
"name": "UP主:早期陈总",
721
"toast": "将减少相似内容推荐"
722
},
723
{
724
"id": 2,
725
"name": "分区:音游",
726
"toast": "将减少相似内容推荐"
727
},
728
{
729
"id": 3,
730
"name": "频道:音乐游戏",
731
"toast": "将减少相似内容推荐"
732
},
733
{
734
"id": 12,
735
"name": "此类内容过多",
736
"toast": "将减少相似内容推荐"
737
},
738
{
739
"id": 13,
740
"name": "推荐过",
741
"toast": "将减少相似内容推荐"
742
},
743
{
744
"id": 1,
745
"name": "不感兴趣",
746
"toast": "将减少相似内容推荐"
747
}
748
],
749
"feedbacks": [
750
{
751
"id": 1,
752
"name": "恐怖血腥",
753
"toast": "将优化首页此类内容"
754
},
755
{
756
"id": 2,
757
"name": "色情低俗",
758
"toast": "将优化首页此类内容"
759
},
760
{
761
"id": 3,
762
"name": "封面恶心",
763
"toast": "将优化首页此类内容"
764
},
765
{
766
"id": 4,
767
"name": "标题党/封面党",
768
"toast": "将优化首页此类内容"
769
}
770
],
771
"watch_later": 1
772
},
773
"args": {
774
"up_id": 1515475415,
775
"up_name": "早期陈总",
776
"rid": 136,
777
"rname": "音游",
778
"tid": 10174,
779
"tname": "音乐游戏",
780
"aid": 836990443
781
},
782
"player_args": {
783
"aid": 836990443,
784
"cid": 1422516399,
785
"type": "av",
786
"duration": 103
787
},
788
"idx": 1706629609,
789
"three_point_v2": [
790
{
791
"title": "添加至稍后再看",
792
"type": "watch_later",
793
"icon": "https://i0.hdslb.com/bfs/activity-plat/static/ce06d65bc0a8d8aa2a463747ce2a4752/NyPAqcn0QF.png"
794
},
795
{
796
"title": "反馈",
797
"subtitle": "(选择后将优化首页此类内容)",
798
"reasons": [
799
{
800
"id": 1,
801
"name": "恐怖血腥",
802
"toast": "将优化首页此类内容"
803
},
804
{
805
"id": 2,
806
"name": "色情低俗",
807
"toast": "将优化首页此类内容"
808
},
809
{
810
"id": 3,
811
"name": "封面恶心",
812
"toast": "将优化首页此类内容"
813
},
814
{
815
"id": 4,
816
"name": "标题党/封面党",
817
"toast": "将优化首页此类内容"
818
}
819
],
820
"type": "feedback"
821
},
822
{
823
"title": "不感兴趣",
824
"subtitle": "(选择后将减少相似内容推荐)",
825
"reasons": [
826
{
827
"id": 4,
828
"name": "UP主:早期陈总",
829
"toast": "将减少相似内容推荐"
830
},
831
{
832
"id": 2,
833
"name": "分区:音游",
834
"toast": "将减少相似内容推荐"
835
},
836
{
837
"id": 3,
838
"name": "频道:音乐游戏",
839
"toast": "将减少相似内容推荐"
840
},
841
{
842
"id": 12,
843
"name": "此类内容过多",
844
"toast": "将减少相似内容推荐"
845
},
846
{
847
"id": 13,
848
"name": "推荐过",
849
"toast": "将减少相似内容推荐"
850
},
851
{
852
"id": 1,
853
"name": "不感兴趣",
854
"toast": "将减少相似内容推荐"
855
}
856
],
857
"type": "dislike"
858
}
859
],
860
"talk_back": "视频,【Phigros自制/崩坏:星穹铁道】欢迎来到匹诺康尼! 不眠之夜 IN Lv.13,22.8万观看,797弹幕,时长1分钟43秒,UP主早期陈总,",
861
"report_flow_data": "{\"flow_card_type\":\"av\"}",
862
"cover_left_text_1": "22.8万",
863
"cover_left_icon_1": 1,
864
"cover_left_1_content_description": "22.8万观看",
865
"cover_left_text_2": "797",
866
"cover_left_icon_2": 3,
867
"cover_left_2_content_description": "797弹幕",
868
"cover_right_text": "1:43",
869
"cover_right_content_description": "1分钟43秒",
870
"desc_button": {
871
"text": "早期陈总",
872
"uri": "bilibili://space/1515475415",
873
"event": "nickname",
874
"type": 1
875
},
876
"can_play": 1,
877
"goto_icon": {
878
"icon_url": "https://i0.hdslb.com/bfs/activity-plat/static/20230227/0977767b2e79d8ad0a36a731068a83d7/077GOeHOfO.png",
879
"icon_night_url": "https://i0.hdslb.com/bfs/activity-plat/static/20230227/0977767b2e79d8ad0a36a731068a83d7/ldbCXtkoK2.png",
880
"icon_width": 16,
881
"icon_height": 16
882
}
883
}
884
],
885
"config": {
886
"column": 2,
887
"autoplay_card": 2,
888
"feed_clean_abtest": 0,
889
"home_transfer_test": 0,
890
"auto_refresh_time": 1200,
891
"show_inline_danmaku": 1,
892
"toast": {},
893
"is_back_to_homepage": true,
894
"enable_rcmd_guide": true,
895
"inline_sound": 2,
896
"auto_refresh_time_by_appear": 1200,
897
"auto_refresh_time_by_active": 1200,
898
"visible_area": 80,
899
"card_density_exp": 1,
900
"story_mode_v2_guide_exp": 6
901
},
902
"interest_choose": null
903
}
904
}
905
```
906
907
</details>