m13253 / BiliDan

Play videos on Bilibili.com with MPV and Danmaku2ASS
http://m13253.blogspot.com/2014/06/watch-bilibili-with-biligrab-danmaku2ass.html
Other
513 stars 69 forks source link

API失效啦,但其实也没变太多 #3

Closed cnbeining closed 10 years ago

cnbeining commented 10 years ago

@m13253 @910JQK

RT

在5个小时不吃不喝后,问题解决了。

但是我还没想好是不是要开源,因为我用了个比较无耻的办法。。。谁帮我下个决心?

其实不用这么麻烦,但是谁能帮我讲明白,B站的API(http://docs.bilibili.cn/wiki/%E5%88%86%E7%B1%BB:API ) 的签名是怎么生成的?原谅我IQ不足没看懂啥意思。。。给个一步步的给三岁小孩讲的例子吧。。。这问题困扰我一年了。。。

m13253 commented 10 years ago

我试了一下那个签名生成法则,出来的结果不一致。 正在继续尝试呢。 如果不开源你可以挂个服务器算hash嘛。

m13253 commented 10 years ago

反编译了Flash播放器,看到 org.lala.utils.PlayerTool 里有一行:

import com.bilibili.interfaces.getSign;
var sign:String = getSign(params[1] + "&player=1");

可惜反编译不出getSign的源码。

cnbeining commented 10 years ago

可不就是么。

我错了,我开源。

https://github.com/cnbeining/Biligrab

更新了,一看便明。

有些东西还是不要abuse的好,所以我弄自己的Appkey上去,这样有问题我盯着。以免以后谁手欠导致正常使用的人也被封。。。

这sign真闹心。。。。。。。。

在 2014年7月31日,下午11:18,Star Brilliant notifications@github.com 写道:

反编译了Flash播放器,看到 org.lala.utils.PlayerTool 里有一行:

import com.bilibili.interfaces.getSign; var sign:String = getSign(params[1] + "&player=1"); 可惜反编译不出getSign的源码。

— Reply to this email directly or view it on GitHub.

m13253 commented 10 years ago

最后那个key是什么key呢? 难道是当时申请的app secret?

cnbeining commented 10 years ago

是的。

看Biligrab 35行,就是那个secret接上去了。

别麻烦了,直接用我的吧。既然都开源了。。。。。。。。。。(设置好UA)

在 2014年7月31日,下午11:35,Star Brilliant notifications@github.com 写道:

最后那个key是什么key呢? 难道是当时申请的app secret?

— Reply to this email directly or view it on GitHub.

m13253 commented 10 years ago

P.S. 调试的时候偶然看到这句……

{"code":-1,"error":"apps is not exists."}

笑抽我了…… I is very goodly in English.

cnbeining commented 10 years ago

招聘我们去吧 wwwww

不知道bishi招了啥人进去。。。。总之这个坑爹的东西今天差点折腾死我。。。

还是有一些app-key是可以不加sign的,当然不多见。。。。 在 2014年7月31日,下午11:55,Star Brilliant notifications@github.com 写道:

P.S. 调试的时候偶然看到这句……

{"code":-1,"error":"apps is not exists."} 笑抽我了…… I is very goodly in English.

— Reply to this email directly or view it on GitHub.