也没想到会再碰到新状况(?)
今天看了个以前那种 只有会员知道的世界 的视频,简单来说就是 游客用户看不见,只有通过了答题(那时B站还是魔鬼100题)的用户才能看见,也就是说对非正式会员用户隐藏 的视频,因为这类视频的一大特征是播放量不是数字或几万而是 “--
” ,所以本着大胆假设小心求证的心理把它交给骰娘分析了一下,主要也是想偷偷知道它的播放量到底是多少
BV18s41167Ze←原BV号及对应api网址(不是视频网址)
然后很意外地发现视频直接无法访问了,返回值如下:
{"code":-403,"message":"访问权限不足","ttl":1}
我并没有针对各种报错进行相应的输出,这个是我的锅
我一开始是没有调取返回值的,就以为是视频不存在,但我很清楚这个视频是存在的,于是手动上浏览器复制了api网址并调取——
{"code":0,"message":"0","ttl":1,"data":{"bvid":"BV18s41167Ze","aid":6075558,"videos":1,"tid":21,"tname":"日常","copyright":2,"pic":"http://i2.hdslb.com/bfs/archive/8e98bdad42aa38ab3be4c9c24a9fd4b9c4903040.jpg","title":"陸揚妄想曼陀羅_LuYang Delusional Mandala","pubdate":1472483666,"ctime":1497430579,"desc":"转自土豆http://www.tudou.com/programs/view/NuzJw5Fh4Vg/ 陸揚 妄想曼陀羅_LuYang Delusional Mandala\n转自土豆http://www.tudou.com/programs/view/NuzJw5Fh4Vg/","desc_v2":[{"raw_text":"转自土豆http://www.tudou.com/programs/view/NuzJw5Fh4Vg/ 陸揚 妄想曼陀羅_LuYang Delusional Mandala\n转自土豆http://www.tudou.com/programs/view/NuzJw5Fh4Vg/","type":1,"biz_id":0}],"state":0,"duration":987,"rights":{"bp":0,"elec":0,"download":1,"movie":0,"pay":0,"hd5":0,"no_reprint":0,"autoplay":0,"ugc_pay":0,"is_cooperation":0,"ugc_pay_preview":0,"no_background":0,"clean_mode":0,"is_stein_gate":0,"is_360":0,"no_share":0,"arc_pay":0,"free_watch":0},"owner":{"mid":8204763,"name":"骷髅死死","face":"http://i0.hdslb.com/bfs/face/fcb3ded0788dd583dd8089c1d1b94e9545f96736.jpg"},"stat":{"aid":6075558,"view":-1,"danmaku":914,"reply":1434,"favorite":11620,"coin":1839,"share":6435,"now_rank":0,"his_rank":0,"like":7292,"dislike":0,"evaluation":"","argue_msg":""},"dynamic":"","cid":9863208,"dimension":{"width":640,"height":360,"rotate":0},"premiere":null,"teenage_mode":0,"is_chargeable_season":false,"no_cache":true,"pages":[{"cid":9863208,"page":1,"from":"vupload","part":"","duration":987,"vid":"","weblink":"","dimension":{"width":640,"height":360,"rotate":0}}],"subtitle":{"allow_submit":false,"list":[]},"is_season_display":false,"user_garb":{"url_image_ani_cut":""},"honor_reply":{}}}
破案了,访问权限原来是正式会员登录的意思啊。
然而,单纯的json格式post和这个get并不能做到让骰娘真的登录B站以获得一个访问权限
虽然以前都不在意,但第一次见识到原来这就叫做只有会员知道的世界啊(……)
顺便可以发现浏览量是-1
而不是我预想中的实际浏览量数字。
总之确实是非常有趣的一个现象,当然对于修改来说并不是什么难事,除非这个api哪天不按格式出结果了
(虽然没测试过62004稿件审核中的错误码,没这条件,但已经测试了其他稿件,按规律是可以适用的)
修改版本已发布,旧版仍然可用,可选择不更新
(你又在测10492了吼)