Skip to content

Commit a007990

Browse files
committed
更新登录组件
1 parent 2518097 commit a007990

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
if: 'tag IS blank'
22
env:
33
global:
4-
- TRAVIS_TAG=v1.7
4+
- TRAVIS_TAG=v1.8
55
jobs:
66
include:
77
-

BiliDrive/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
__author__ = "Hsury"
88
__email__ = "i@hsury.com"
99
__license__ = "SATA"
10-
__version__ = "2019.12.16"
10+
__version__ = "2019.12.22"

BiliDrive/bilibili.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Bilibili:
1414

1515
def __init__(self):
1616
self._session = requests.Session()
17-
self._session.headers.update({'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.79 Safari/537.36"})
17+
self._session.headers.update({'User-Agent': "Mozilla/5.0 BiliDroid/5.51.1 (bbcallen@gmail.com)"})
1818
self.get_cookies = lambda: self._session.cookies.get_dict(domain=".bilibili.com")
1919
self.get_uid = lambda: self.get_cookies().get("DedeUserID", "")
2020
self.username = ""
@@ -82,7 +82,7 @@ def get_key():
8282
while True:
8383
key = get_key()
8484
key_hash, pub_key = key['key_hash'], key['pub_key']
85-
url = f"https://passport.bilibili.com/api/v3/oauth2/login"
85+
url = f"https://passport.bilibili.com/api/v2/oauth2/login"
8686
param = f"appkey={Bilibili.app_key}&password={parse.quote_plus(base64.b64encode(rsa.encrypt(f'{key_hash}{self.password}'.encode(), pub_key)))}&username={parse.quote_plus(self.username)}"
8787
payload = f"{param}&sign={self.calc_sign(param)}"
8888
headers = {'Content-type': "application/x-www-form-urlencoded"}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<h4 align="center">☁️ 哔哩哔哩云,支持任意文件的全速上传与下载 ☁️</h4>
88

99
<p align="center">
10-
<img src="https://img.shields.io/badge/version-2019.12.16-green.svg?longCache=true&style=for-the-badge">
10+
<img src="https://img.shields.io/badge/version-2019.12.22-green.svg?longCache=true&style=for-the-badge">
1111
<img src="https://img.shields.io/badge/license-SATA-blue.svg?longCache=true&style=for-the-badge">
1212
<img src="https://img.shields.io/travis/com/Hsury/BiliDrive?style=for-the-badge">
1313
</p>

0 commit comments

Comments
 (0)