XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/bilibili-API-collect

可以交工了!

aae653b
MineCreeper86 <61276297+MineCreeper86@users.noreply.github.com>
提交于

代码差异

1 个文件 +205 -3
Modified article/articles.md +205 -3
@@ -2,11 +2,11 @@
2 2
3 3 ## 获取文集基本信息
4 4
5 > https://api.bilibili.com/x/article/list/web/articles
5 > http://api.bilibili.com/x/article/list/web/articles
6 6
7 7 *请求方式:GET*
8 8
9 认证方式:我不确定,dalao你帮我写吧
9 认证方式:Cookie(SESSDATA)
10 10
11 11 **url参数:**
12 12
@@ -100,4 +100,206 @@
100 100 | face | str | 作者头像url | |
101 101 | official_verify | obj | 作者认证信息 | |
102 102 | nameplate | obj | 作者勋章 | |
103 | vip | obj | 作者大会员状态 | |
103 | vip | obj | 作者大会员状态 | |
104
105 **示例:**
106
107 查询文集`rl207146`的基本信息
108
109 ```shell
110 curl -G 'http://api.bilibili.com/x/article/list/web/articles'\
111 --data-urlencode 'id=207146'\
112 -b 'SESSDATA=xxx'
113 ```
114
115 ```json
116 {
117 "code": 0,
118 "message": "0",
119 "ttl": 1,
120 "data": {
121 "list": {
122 "id": 207146,
123 "mid": 293793435,
124 "name": "B站api研究笔记",
125 "image_url": "https://i0.hdslb.com/bfs/article/96d2b3d2a72e6497a011c885ab9245c51507ce18.png",
126 "update_time": 1585036952,
127 "ctime": 1582718126,
128 "publish_time": 1585045493,
129 "summary": "",
130 "words": 8697,
131 "read": 1654,
132 "articles_count": 3,
133 "state": 1,
134 "reason": "",
135 "apply_time": "",
136 "check_time": ""
137 },
138 "articles": [
139 {
140 "id": 4815593,
141 "title": "【B站API】api研究笔记ep1-视频基本信息",
142 "state": 0,
143 "publish_time": 1582643908,
144 "words": 2906,
145 "image_urls": [
146 "https://i0.hdslb.com/bfs/article/00497c8df7130f22e5b953694b8931a22d32f133.jpg"
147 ],
148 "category": {
149 "id": 26,
150 "parent_id": 17,
151 "name": "数码"
152 },
153 "categories": [
154 {
155 "id": 17,
156 "parent_id": 0,
157 "name": "科技"
158 },
159 {
160 "id": 26,
161 "parent_id": 17,
162 "name": "数码"
163 }
164 ],
165 "summary": "各位小可爱们大家好啊,终于可以结束我长达一年的咕咕了.........在这蝠想联翩的日子里也闲的没事,除了上课就是睡觉,还不如搞点事情哪个猿不想拥有自己的B站爬虫呢(误),当然自制一个B站的综合信息台也是可以的,比如显示粉丝数 获赞数(掉粉警告)于是就萌生了这个研究B站api的想法,以后也会继续不定期分享我的主体思路是利用Chrome中的F12工具进行分析,再用curl进行验证先从视频下手吧qwq我们以av2075941为例network检测下,有各种图片、视频、网页、js。。。。。的传输记录",
166 "stats": {
167 "view": 578,
168 "favorite": 19,
169 "like": 26,
170 "dislike": 0,
171 "reply": 19,
172 "share": 6,
173 "coin": 10,
174 "dynamic": 0
175 },
176 "like_state": 0
177 },
178 {
179 "id": 4820548,
180 "title": "【B站API】api研究笔记ep2-视频其他信息",
181 "state": 0,
182 "publish_time": 1582688189,
183 "words": 4319,
184 "image_urls": [
185 "https://i0.hdslb.com/bfs/article/2416ee72759a5c2c8bba0f10d42e789fc0c0ae2b.jpg"
186 ],
187 "category": {
188 "id": 26,
189 "parent_id": 17,
190 "name": "数码"
191 },
192 "categories": [
193 {
194 "id": 17,
195 "parent_id": 0,
196 "name": "科技"
197 },
198 {
199 "id": 26,
200 "parent_id": 17,
201 "name": "数码"
202 }
203 ],
204 "summary": "大家中午好鸭昨天我们研究了B站api的获取方法和使用方法 这一期我们继续分享另一个从网页中寻找api的方法以及研究视频的其他api接口以av170001为例首先打开视频,在F12的network下的监控中加载页面筛选XHR对象用搜索法的效率较低,不如我们直接进行筛选&观察通过对资源路径的观察可以猜到某些有关的项比如playurl有可能是播放的地址,pagelist可能是分P列表,view不就是昨天研究的『视频基本信息』吗通过继续分析我总结出了以下api这个可以在只想获取简介时应用,而不用处理多余",
205 "stats": {
206 "view": 737,
207 "favorite": 14,
208 "like": 18,
209 "dislike": 0,
210 "reply": 14,
211 "share": 1,
212 "coin": 1,
213 "dynamic": 0
214 },
215 "like_state": 0
216 },
217 {
218 "id": 5263184,
219 "title": "【B站API】api研究笔记Special-AV与BV互转",
220 "state": 0,
221 "publish_time": 1585045493,
222 "words": 1472,
223 "image_urls": [
224 "https://i0.hdslb.com/bfs/article/b520939046899303cfcac1511308eb87ede760d7.jpg"
225 ],
226 "category": {
227 "id": 26,
228 "parent_id": 17,
229 "name": "数码"
230 },
231 "categories": [
232 {
233 "id": 17,
234 "parent_id": 0,
235 "name": "科技"
236 },
237 {
238 "id": 26,
239 "parent_id": 17,
240 "name": "数码"
241 }
242 ],
243 "summary": "昨天视频新编号BV上线了,所有视频的编号默认都变成了BVxxx,不再是avxxx,兼容在链接和搜索中输入av号,评论区和动态av和bv都可以一键传送显然日益增长的投稿量对于编号是个问题,int是有上限的,但一串“乱码”缺少了灵魂,还会让我们想到磁力链接或者熊掌盘的链接(手动狗头)看到av170001,我会想到“法克儿~~”,但看到BV17x411w7KC,我?????其实av号并没有消失,只不过它已经隐藏于大众的视野里了,av和bv本质上是可以双向转换的方法一(电脑版推荐):打开一个视频,会发现",
244 "stats": {
245 "view": 343,
246 "favorite": 9,
247 "like": 13,
248 "dislike": 0,
249 "reply": 9,
250 "share": 0,
251 "coin": 2,
252 "dynamic": 0
253 },
254 "like_state": 0
255 }
256 ],
257 "author": {
258 "mid": 293793435,
259 "name": "社会易姐QwQ",
260 "face": "http://i1.hdslb.com/bfs/face/aebb2639a0d47f2ce1fec0631f412eaf53d4a0be.jpg",
261 "pendant": {
262 "pid": 0,
263 "name": "",
264 "image": "",
265 "expire": 0
266 },
267 "official_verify": {
268 "type": -1,
269 "desc": ""
270 },
271 "nameplate": {
272 "nid": 4,
273 "name": "青铜殿堂",
274 "image": "http://i1.hdslb.com/bfs/face/2879cd5fb8518f7c6da75887994c1b2a7fe670bd.png",
275 "image_small": "http://i1.hdslb.com/bfs/face/6707c120e00a3445933308fd9b7bd9fad99e9ec4.png",
276 "level": "普通勋章",
277 "condition": "单个自制视频总播放数>=1万"
278 },
279 "vip": {
280 "type": 2,
281 "status": 1,
282 "due_date": 0,
283 "vip_pay_type": 0,
284 "theme_type": 0,
285 "label": null
286 }
287 },
288 "last": {
289 "id": 0,
290 "title": "",
291 "state": 0,
292 "publish_time": 0,
293 "words": 0,
294 "image_urls": [ ],
295 "category": {
296 "id": 0,
297 "parent_id": 0,
298 "name": ""
299 },
300 "categories": [ ],
301 "summary": ""
302 },
303 "attention": true
304 }
305 }