Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

针对BV号的问题 #86

Open
FanLu1994 opened this issue May 1, 2020 · 4 comments
Open

针对BV号的问题 #86

FanLu1994 opened this issue May 1, 2020 · 4 comments

Comments

@FanLu1994
Copy link

FanLu1994 commented May 1, 2020

通过接口,根据BV号获取到AV号,然后进行下载。操作系统为win10。

#根据BV号获取AV号
def getAid(Bid):
    headers = {
        'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36'
    }
    url = "https://api.bilibili.com/x/web-interface/view?bvid="+Bid
    r = requests.get(url,headers=headers)
    j = json.loads(r.text)
    # print(j["data"]["aid"])
    return j["data"]["aid"]
@suzukazeAobaDesu
Copy link

感谢,很有用

@ancba
Copy link

ancba commented Jul 7, 2020

听说bv号是由av号加密转变过来的,可以通过bv转化过来,可以试一下

@FanLu1994
Copy link
Author

听说bv号是由av号加密转变过来的,可以通过bv转化过来,可以试一下

破解加密吗? 等你解决了 艾特一下

@ancba
Copy link

ancba commented Jul 8, 2020

不知道为什么,但是网上的资料有点少(可能是关键字的问题?)
根据https://www.zhihu.com/question/381784377/answer/1099438784 来看,b站对bv号是通过av号加密而来,加密方法有点类似于base58
另外,官方的端口貌似不支持av了?返回的json中就留下一个error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants