bilibili用户信息查询
bilibili用户信息查询
http://space.bilibili.com/ajax/member/GetInfo?mid=
后缀为用户mid号
# -*- coding:utf-8 -*-
# !python3
import requests
import json
url = 'http://space.bilibili.com/ajax/member/GetInfo?mid=423895'
head = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,'
' like Gecko) Chrome/52.0.2743.82 Safari/537.36'
}
jscontent = requests.get(url, headers=head, verify=False).content.decode()
jsDict = json.loads(jscontent)
with open("bilibili.json", "w+") as f:
f.write(json.dumps(jsDict, indent=4, ensure_ascii=False))
返回json的用户信息:
{"status":true,"data":{"mid":"423895","name":"\u6015\u4e0a\u706b\u66b4\u738b\u8001\u83ca","approve":false,"sex":"\u4fdd\u5bc6","rank":"10000","face":"http://i1.hdslb.com/bfs/face/b55e96895608e03c3435d018b708a705ccc2bda4.gif","coins":0,"DisplayRank":"1043","regtime":1339205465,"spacesta":0,"birthday":"1949-03-22","place":"","description":"","article":0,"attentions":[43536,244842,88358,569636,420876,201434,673816,374377,100691,920713,397435,35680,375375,12994,891124,15810,379803,33696,585267,12018,168598,356776,1344144,1734728,295641,2276820,145716,3307964,2825112,546195,104884,1276787,6159663,433715,365031,2019740,315834,684169,7349735,288239,389088,97126,17380425,3882203,1605721,275981,20416199,193584,508727,1526035,2821930],"fans":787311,"friend":51,"attention":51,"sign":"weibo.com/573244552","level_info":{"current_level":6,"current_min":28800,"current_exp":683814,"next_exp":"-"},"pendant":{"pid":0,"name":"","image":"","expire":0},"nameplate":{"nid":1,"name":"\u9ec4\u91d1\u6bbf\u5802","image":"http://i1.hdslb.com/bfs/face/82896ff40fcb4e7c7259cb98056975830cb55695.png","image_small":"http://i1.hdslb.com/bfs/face/627e342851dfda6fe7380c2fa0cbd7fae2e61533.png","level":"\u7a00\u6709\u52cb\u7ae0","condition":"\u5355\u4e2a\u81ea\u5236\u89c6\u9891\u603b\u64ad\u653e\u6570>=100\u4e07"},"toutu":"group1/M00/F8/78/oYYBAFalncSAEKmvAABOHh0VmYQ216.jpg","theme":"default","theme_preview":"","im9_sign":"84f3315e94daa8fd4a32a774e570c608","playNum":97019723}}
编码为Unicode编码方式
json包含信息:
{
"status": true,
"data": {
"place": "",
"spacesta": 0,
"nameplate": {
"image_small": "http://i1.hdslb.com/bfs/face/627e342851dfda6fe7380c2fa0cbd7fae2e61533.png",
"level": "稀有勋章",
"image": "http://i1.hdslb.com/bfs/face/82896ff40fcb4e7c7259cb98056975830cb55695.png",
"nid": 1,
"name": "黄金殿堂",
"condition": "单个自制视频总播放数>=100万"
},
"im9_sign": "96e2e2e72b8db3411c157d1001f8e948",
"friend": 51,
"toutu": "group1/M00/F8/78/oYYBAFalncSAEKmvAABOHh0VmYQ216.jpg",
"pendant": {
"name": "",
"expire": 0,
"pid": 0,
"image": ""
},
"attentions": [
43536,
244842,
88358,
569636,
420876,
201434,
673816,
374377,
100691,
920713,
397435,
35680,
375375,
12994,
891124,
15810,
379803,
33696,
585267,
12018,
168598,
356776,
1344144,
1734728,
295641,
2276820,
145716,
3307964,
2825112,
546195,
104884,
1276787,
6159663,
433715,
365031,
2019740,
315834,
684169,
7349735,
288239,
389088,
97126,
17380425,
3882203,
1605721,
275981,
20416199,
193584,
508727,
1526035,
2821930
],
"name": "怕上火暴王老菊",
"coins": 0,
"face": "http://i1.hdslb.com/bfs/face/b55e96895608e03c3435d018b708a705ccc2bda4.gif",
"theme": "default",
"fans": 789300,
"article": 0,
"regtime": 1339205465,
"approve": false,
"rank": "10000",
"theme_preview": "",
"birthday": "1949-03-22",
"playNum": 97095510,
"sex": "保密",
"attention": 51,
"mid": "423895",
"description": "",
"DisplayRank": "1043",
"level_info": {
"current_level": 6,
"current_exp": 685387,
"next_exp": "-",
"current_min": 28800
},
"sign": "weibo.com/573244552"
}
}
个人空间:http://space.bilibili.com/0/#!/index
登录状态下mid为0时会跳转到当前用户的个人空间
非登录状态下会转到登录界面
找到了一只站长,bishi(bilibili创始人)
站长大人独占了两个号
mid=1
mid=2
bilibili用户信息查询的更多相关文章
- 基于jsp+servlet图书管理系统之后台用户信息查询操作
上一篇的博客写的是插入操作,且附有源码和数据库,这篇博客写的是查询操作,附有从头至尾写的代码(详细的注释)和数据库! 此次查询操作的源码和数据库:http://download.csdn.net/de ...
- Linux用户信息查询
1 查询目前已登录的用户信息w 或者 who [@bjzw_11_210 ~]# w :: up days, :, users, load average: 0.03, 0.04, 0.00 USER ...
- Linux用户管理及用户信息查询
useradd 创建用户,更改用户信息 1.工作原理流程 使用此命令式,若不加任何参数选项,直接跟用户名,那么系统会首先读取/etc/login.defs(用户定义文件)和/etc/default/u ...
- linux命令之用户管理及用户信息查询命令(下)
1.visudo:编辑sudoers文件 该命令专门用来编辑/etc/sudoers文件,同时提供语法检查等功能. 示例: 1)执行visudo对普通用户授权 [root@boxiaoyuan ~]# ...
- Liunx运维(七)-用户管理及用户信息查询命令
文档目录: 一.useradd:创建用户 二.usermod:修改用户信息 三.userdel:删除用户 四.groupadd:创建新的用户组 五.groupdel:删除用户组 六.passwd:修改 ...
- 基于Hive的对BiliBili用户信息进行数据分析
用户表字段信息: 1.查出前1000位用户的用户名,关注数和粉丝数. 2.查询关注数大于100的用户的用户名和关注数. 3.查询粉丝数大于100的用户的用户名,粉丝数. 4.查询id为1000的用户的 ...
- Oracle用户信息查询
1.查看所有用户: select * from dba_users; select * from all_users; select * from user_users; 2.查看用户或角 ...
- linux命令之用户管理及用户信息查询命令(上)
1.useradd:创建用户 该命令用于创建新的用户或者更改用户的信息. 参数 说明 -g 指定用户对应的用户组,用户组 -s 用户登录后使用的Shell名称 -u 用户的ID值 示例: 1)user ...
- S7 Linux用户管理及用户信息查询命令
7.1 useradd:创建用户 7.2-5 usermod 7.6 passwd:修改用户密码 7.7-9 chage.chpasswd.su 7.10-11 visudo.sudo 7.12-7. ...
随机推荐
- UVA 11383 - Golden Tiger Claw(二分图完美匹配扩展)
UVA 11383 - Golden Tiger Claw 题目链接 题意:给定每列和每行的和,给定一个矩阵,要求每一个格子(x, y)的值小于row(i) + col(j),求一种方案,而且全部行列 ...
- PowerPC汇编指令集
PowerPC 体系结构规范(PowerPC Architecture Specification)公布于 1993 年,它是一个 64位规范 ( 也包括 32 位子集 ).差点儿全部常规可用的 Po ...
- 【网络协议】ICMP协议、Ping、Traceroute
ICMP协议 ICMP常常被觉得是IP层的一个组成部分,它是网络层的一个协议.它传递差错报文以及其它须要注意的信息.ICMP报文通常被IP层或更高层(TCP.UDP等)使用,它是在IP数据报内 ...
- Empower Developers
 Empower Developers Timothy High THingS ARE uSuAlly EASiER SAid THAn donE, and software architects ...
- Resin 优化配置
1.在resin.conf中的session-config内部添加 <session-max>4096</session-max> <session-timeout> ...
- 分布式系统CAP原则与BASE思想
一.CAP原则 CAP原则又称CAP定理,指的是在一个分布式系统中, Consistency(一致性). Availability(可用性).Partition tolerance(分区容错性),三者 ...
- 10.2 Hibernate持久层
点击项目右键->MyEclipse->Add Hibernate Capabilities 打开MyEclipse Hibernate Perspective(MyEclipse Hibe ...
- 南海区行政审批管理系统接口规范v0.3(规划) 5.投资项目联合审批系统API 5.1.【uploadFile】证件文书附件上传
- hihoCoder-1839 榶榶榶 数学
题面 题意:给你一个500000长度的数字,然后环形的让每位做头,例如123,就有123,231,312三个,然后问这n个数字的和S,S的最小非1因子是多少 题解:每个数字在每个位置都会有一次,如果说 ...
- guice 整合ninja framework(七)
ninja是一个优秀的,轻量级的mvc框架,它与google guice整合比较好.下面看一下例子: 我们在web.xml 配置一下: <listener> <listener-cl ...