Skip to content

Commit

Permalink
尝试修复秒传转存31039错误
Browse files Browse the repository at this point in the history
  • Loading branch information
hxz393 committed Sep 12, 2023
1 parent b9fb2d4 commit 970235c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
21 changes: 8 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,14 @@ BaiduPCS-Go rapidupload -length=418024594 -md5=31f141fee63d038a46db179367315f3a
# 更新日志
为避免更新日志过长,只保留最近更新日志。

## 版本 2.3.1(2023.09.12)

修复内容:

1. 尝试解决秒传转存报错“31039”。



## 版本 2.3.0(2023.09.08)

修复内容:
Expand Down Expand Up @@ -291,19 +299,6 @@ BaiduPCS-Go rapidupload -length=418024594 -md5=31f141fee63d038a46db179367315f3a



## 版本 2.1(2023.05.16)

更新内容:

1. 添加 “使用系统代理” 勾选框。

修复内容:

1. 修复因为删除 `User-Agent` 参数,导致读取配置文件出错,打开软件报错。
2. 修改部分变量和函数名,使代码更规范。




## 版本 1.13(2023.03.21)

Expand Down
11 changes: 7 additions & 4 deletions bpftUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ def thread_it(func, *args):
class BaiduPanFilesTransfers:
"""
名称:BaiduPanFilesTransfers
版本:2.3.0
版本:2.3.1
作者:assassing(https://github.com/hxz393)
参考:https://pan.baidu.com/union/doc/rksg0sa17
打包:pyinstaller -F -w -i bpftUI.ico -n BaiduPanFilesTransfers bpftUI.py
"""

Expand Down Expand Up @@ -134,7 +135,7 @@ def __init__(self):
self.root.iconbitmap(default=self.ICON_PATH)

# 主窗口配置
self.root.wm_title("BaiduPanFilesTransfers 2.3.0")
self.root.wm_title("BaiduPanFilesTransfers 2.3.1")
self.root.wm_geometry('410x480+240+240')
self.root.minsize(410, 480)
self.root.wm_attributes("-alpha", 0.88)
Expand Down Expand Up @@ -276,11 +277,13 @@ def transfer_files_rapid(self, rapid_data, target_directory_name):

for _ in range(15):
rapid_data[0] = ''.join(random.choice([c.upper(), c.lower()]) for c in rapid_data[0])
post_data = f'&block_list=["{rapid_data[0]}"]&path=/{quote(target_directory_name)}/{quote(rapid_data[3])}&size={rapid_data[2]}&isdir=0&rtype=0'
post_data = f'&block_list=["{rapid_data[0]}"]&path=/{quote(target_directory_name)}/{quote(rapid_data[3])}&size={rapid_data[2]}&isdir=0&rtype=2'
response = self.session.post(url=url, headers=header, data=post_data, timeout=15, allow_redirects=False, verify=False)
response_json = response.json()

if response_json['errno'] not in [404, 2]:
if response_json['errno'] in [31039]:
rapid_data[3] += '1'
elif response_json['errno'] not in [404, 2]:
break
else:
time.sleep(0.1)
Expand Down

0 comments on commit 970235c

Please sign in to comment.