Skip to main content

A small api package for bilibilirank

Project description

BilibiliRank

bilibilirank是哔哩哔哩排行榜的第三方api,详见:哔哩哔哩排行榜 (bilibili.com)

欢迎关注扫描ly_peppa的微信公众号“安乐窝”,更多资源和信息与您分享。另外,由于ly_peppa官网在重新设计和开发,最新接口的使用文档都会在微博、公众号发布,所以,请扫码关注,谢谢!

QQ交流群:

  • 一群(欢迎ing):2836084073

Dependencies

python 2.x/3.x

pandas

Installation

pip install bilibilirank

Upgrade

pip install bilibilirank --upgrade

Quick Start

一、排行榜

导入bilibilirank包:

import bilibilirank as brc

1、全站:

    df=brc.PopularRank('全站')
    print(df)
    df.to_excel('out.xlsx')

输出显示:

          aid  videos  tid tname  ...  mission_id up_from_v2 season_id  others
0   205540661       1  137    明星  ...         NaN        NaN       NaN     NaN
1   545536244       1  183  影视剪辑  ...     20872.0        8.0       NaN     NaN
2   888038028       1  138    搞笑  ...     21765.0        NaN       NaN     NaN
3   845534966       4  172  手机游戏  ...         NaN        NaN       NaN     NaN
4   545678427       1   76  美食制作  ...     24068.0        NaN     134.0     NaN
..        ...     ...  ...   ...  ...         ...        ...       ...     ...
95  205683022       1  201  科学科普  ...     20599.0        NaN       NaN     NaN
96  888027138       1  171  电子竞技  ...         NaN        NaN       NaN     NaN
97  290598676       1  183  影视剪辑  ...     20870.0        NaN       NaN     NaN
98  460587343       1  213  美食测评  ...     19851.0        NaN       NaN     NaN
99  333011169       1  205    社会  ...     21387.0        NaN       NaN     NaN

2、电影:

df=brc.PopularRank('电影')

输出显示:

   badge  ...                                                url
0   会员专享  ...  https://www.bilibili.com/bangumi/play/ss38695?...
1     独家  ...  https://www.bilibili.com/bangumi/play/ss38688?...
2   会员专享  ...  https://www.bilibili.com/bangumi/play/ss38692?...
3   会员特价  ...  https://www.bilibili.com/bangumi/play/ss38552?...
4   会员专享  ...  https://www.bilibili.com/bangumi/play/ss38663?...

3、番剧:

df=brc.PopularRank('番剧')

输出显示:

   badge  ...                                            url
0     独家  ...  https://www.bilibili.com/bangumi/play/ss36167
1   会员抢先  ...  https://www.bilibili.com/bangumi/play/ss38229
2   会员抢先  ...  https://www.bilibili.com/bangumi/play/ss38221
3     独家  ...  https://www.bilibili.com/bangumi/play/ss38214
4   会员专享  ...  https://www.bilibili.com/bangumi/play/ss33378

二、入站必刷

df=brc.PopularRank('番剧')

输出显示:

          aid  videos  tid  ...            achievement  season_id order_id
0    60731116       1   22  ...          「2019黄绿合战」第一名        NaN      NaN
1   540082845       2   17  ...              MC建筑品类的巅峰        NaN      NaN
2   626357031       1   22  ...           影视鬼畜的巅峰代表作之一        NaN      NaN
3    80582841       1  122  ...  原作出品方盖戳认证,对“技术宅”的完美诠释        NaN      NaN
4   626524324       2  190  ...     央视点名称赞,数码男孩的硬核浪漫礼物        NaN      NaN
..        ...     ...  ...  ...                    ...        ...      ...
73    8506694       1   30  ...     「2017哔哩哔哩音乐大赏」获奖作品        NaN      NaN
74    1638627       1  183  ...             误解系混剪视频的巅峰        NaN      NaN
75    5512579       1   28  ...  2016年度神曲,彩虹室内合唱团成名作之一        NaN      NaN
76    1252354       1   31  ...  13国歌手合唱,献给世界和平的音乐合作企划        NaN      NaN
77    3905480       1   47  ...          国产动画《风灵玉秀》的起源        NaN      NaN

三、综合热门

df = brc.PopularHot()

输出显示:

           aid  videos  ...  up_from_v2 season_id
0    460656938       1  ...         NaN       NaN
1    205746701       1  ...         NaN       NaN
2    333064283       1  ...         NaN       NaN
3    290648532       1  ...         8.0       NaN
4    503238224       1  ...         NaN       NaN
..         ...     ...  ...         ...       ...
195  673091329       1  ...         NaN       NaN
196  845617591       1  ...         NaN       NaN
197  248101686       1  ...         NaN       NaN
198  845695718       1  ...        19.0       NaN
199  888141435       1  ...         NaN       NaN

四、每周必看

1、往期历史:

df = brc.PopularWeekly(0)

输出显示:

     number     subject  status                     name
0       112     史上最骚魔法师       2  2021第112期 05.07 - 05.13
1       111      两面包夹芝士       2  2021第111期 04.30 - 05.06
2       110        潘嘎之交       2  2021第110期 04.23 - 04.29
3       109  橘子老六说唱diss       2  2021第109期 04.16 - 04.22
4       108     手工复刻三星堆       2  2021第108期 04.09 - 04.15
..      ...         ...     ...                      ...
107       5      复仇者联盟4       2    2019第5期 04.19 - 04.25
108       4       巴黎圣母院       2    2019第4期 04.12 - 04.18
109       3    人类首张黑洞照片       2    2019第3期 04.05 - 04.11
110       2    噬元兽大战哥斯拉       2    2019第2期 03.29 - 04.04
111       1        神仙爱情       2    2019第1期 03.22 - 03.28

2、最新一期:

df = brc.PopularWeekly(-1)

输出显示:

          aid  videos  tid  ...       rcmd_reason  up_from_v2 season_id
0   758109116       1   17  ...    听说“史上最骚”一般都是大作         NaN       NaN
1   587904007       1   24  ...       MAD之神,转场燃炸!         NaN       NaN
2   757891055      18   17  ...          结尾给人整破防了         NaN       NaN
3   290412903       1  137  ...              正视问题         NaN       NaN
4   375572496       1   21  ...         介天津味儿够哏啊~         NaN       NaN
5   758021984       3  138  ...         吉米多维奇注入灵魂         NaN       NaN
6   418037886       1   29  ...   初听不识曲中意,再听已是曲中人         NaN       NaN
7   545597270       1   31  ...      当年的二级号已成了六级号         NaN       NaN
8   757930107       1  193  ...       全国高校弹幕开会名场面         NaN       NaN
9   673100337       1  201  ...             E定有用!         NaN       NaN
10  205432270       1  204  ...    “中国来去自由,下一个问题”         NaN       NaN

五、Top100

df = brc.PopularTop100('全站')

输出显示:

                                     标题  ...     综合得分
排名                                       ...         
1     凤凰传奇来报道,跟B站的小伙伴们打个迟到的招呼,大家好,爱你们哟~  ...  3045226
2                     【郎朗】海 上 东 北 钢 琴 师  ...  2818851
3                              不要“叫”挑战!  ...  2659626
4                   《原神》角色演示-「优菈:闪灼的烛光」  ...  2484676
5             店里卖898一份的招牌菜,自己在家做,居然只花了…  ...  2412189
..                                  ...  ...      ...
96                    【科普】我们为什么会有痒这种感觉?  ...   880253
97             为什么致命节奏是石头人的最强符文!必看质量干货!  ...   875338
98   “她们所以为的结局,不过是神的故意示弱.” | 「禁忌女孩2/娜诺」  ...   869509
99          试吃逍遥馒头蟹,做一道香辣蟹,还没出锅口水都要流下来了  ...   859304
100           尬!亲爹让熊孩子捡瓶子体验生活 被当成人贩子报了警  ...   854880

更多文档

Change Logs

0.0.4 2021/05/18

  • 编写说明文档

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bilibilirank-0.0.4.tar.gz (9.9 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page