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. ...
随机推荐
- GNUPlot绘制曲线
发现gnuplot在mac上编译安装相当方便,在线下为了測试java老堆和lucene索引大小,须要绘制两条线,可是直接点连的线很难看,所以后面使用贝塞尔曲线. 脚本例如以下: #! /usr/loc ...
- springmvc之@Controller、@RequestMapping等注解解说
首先来看下一段代码: @Controller @RequestMapping("/user") public class UsersController { @RequestMap ...
- [Oracle] Oracle终极解锁
一些ORACLE中的进程被杀掉后,状态被置为"killed",但是锁定的资源很长时间不释放,有时实在没办法,只好重启数据库.现在提供一种方法解决这种问题,那就是在ORACLE中杀不 ...
- Java基础之多线程简述
首先,要辨析进程与线程的概念: 进程是程序执行的过程,它持有资源和线程,相对于程序本身而言具有动态性. 线程是系统中最小的执行单元,同一个进程中可能有多个线程,它们共享该进程持有的资源.线程的通信也称 ...
- [hihicoder][Offer收割]编程练习赛47
删除树节点 #pragma comment(linker, "/STACK:102400000,102400000") #include<stdio.h> #inclu ...
- (转载)更新到Retrofit2的一些技巧
更新到Retrofit2的一些技巧 作者 小武站台 关注 2016.02.22 22:13* 字数 1348 阅读 1621评论 0喜欢 5赞赏 1 原文链接:Tips on updating to ...
- 错误:Camera录制视频(6.0错误),5.1正常,7.1正常 (java.lang.RuntimeException: start failed.at android.media.MediaRecorder.native_start(Native Method))
Process: com.example.mycamera2, PID: 24086 java.lang.RuntimeException: start failed. at android.medi ...
- Spring aop(实验写法)
1. 创建通知:定义一个接口 Public interface Sleepable { voidsleep(); }然后写一个Human类,他实现了这个接口 publicHuman implement ...
- dataAdapter
public static class DataAdapter { /// <summary> /// DataRow转换成Hash对象 /// </summary> /// ...
- MongoDB 博客截图之二
使用内置帮助help() 基本命令示例 来源:MongoDB基本管理命令 - 千与的专栏 - 博客频道 - CSDN.NET