Skip to content

Commit

Permalink
新功能测试完毕。
Browse files Browse the repository at this point in the history
  • Loading branch information
hxz393 committed May 15, 2023
1 parent b60164a commit 9a7c68c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

## 版本说明

软件重构后的 2.0 版本已发布,没经过充分测试,可能有无法预料的 BUG,欢迎提交 [Issue](https://github.com/hxz393/BaiduPanFilesTransfers/issues) 反馈。同时 1.13 版本依然可用(截至 2023.05.12),但后续不再更新 1.X 版本。
软件重构后的 2.X 版本已发布,没经过充分测试,可能有无法预料的 BUG,欢迎提交 [Issue](https://github.com/hxz393/BaiduPanFilesTransfers/issues) 反馈。同时 1.13 版本依然可用(截至 2023.05.12),但后续不再更新 1.X 版本。



Expand All @@ -74,7 +74,7 @@

# 软件使用

软件使用分为下面 4 个步骤
软件使用分为下面几个步骤

## 获取 Cookies

Expand Down Expand Up @@ -136,6 +136,7 @@ bdlink=QkQyMTUxNjJENzE5NDc4QkNBRDJGMTMyNTlFMTEzNzAjRkJBMTEzQTY1M0QxN0Q1NjM3QUQ1M

```sh
965FEAFCC6DC216CB56128B531694C9D#495B4FB5879AE0B22A31826D33D86D80#802846691#梦姬标准.7z
4159f28726f88ba7aab8cbb6a8afbae1#201442718#patch.rar
```

**Go 格式:**
Expand All @@ -160,6 +161,12 @@ bdpan://44K344Or44Kv44Gu5p6c5a6fICsg44Go44KJ44Gu44GC44Gq44CA5o+P44GN5LiL44KN44GX



## 使用系统代理

软件默认会绕过网络系统代理,但不能绕过网络全局代理。

如果处于特殊网络环境下,需要配置网络系统代理模式,才能正常访问百度网盘,勾选上 “使用系统代理” 勾选框后,再执行转存。



# 常见问题
Expand Down Expand Up @@ -247,11 +254,11 @@ bdpan://44K344Or44Kv44Gu5p6c5a6fICsg44Go44KJ44Gu44GC44Gq44CA5o+P44GN5LiL44KN44GX

更新内容:

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

修复内容:

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


Expand Down
16 changes: 10 additions & 6 deletions bpftUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import os
import sys
import re
from tkinter import Tk, Entry, Label, Text, Scrollbar, Button, Checkbutton, W, S, N, E, END, NONE
from tkinter import Tk, Entry, Label, Text, Scrollbar, Button, Checkbutton, W, S, N, E, END, NONE, BooleanVar

import requests
import urllib3
Expand Down Expand Up @@ -50,8 +50,8 @@ def thread_it(func, *args):
class BaiduPanFilesTransfers:
"""
软件名:BaiduPanFilesTransfers
版本:2.0
更新时间:2023.05.13
版本:2.1
更新时间:2023.05.16
打包命令:pyinstaller -F -w -i bpftUI.ico bpftUI.py
"""

Expand Down Expand Up @@ -96,8 +96,6 @@ def __init__(self):
self.session = requests.Session()
urllib3.disable_warnings()
self.bdstoken = None
# 设为 False 来使用 IDE 中配置的代理
# self.session.trust_env = False

# 实例化 TK
self.root = Tk()
Expand All @@ -124,9 +122,13 @@ def __init__(self):
self.text_logs = self.create_text_scrollbar(10)
self.bottom_run = Button(self.root, text='4.点击运行', command=lambda: thread_it(self.main, ), width=10, height=1, relief='solid')
self.bottom_run.grid(row=9, pady=6, sticky=W, padx=4)
self.label_state = Label(self.root, text='检查新版', font=('Arial', 10, 'underline'), foreground="#0000ff", cursor='heart')
self.label_state = Label(self.root, text='使用帮助', font=('Arial', 10, 'underline'), foreground="#0000ff", cursor='heart')
self.label_state.grid(row=9, sticky=E, padx=4)
self.label_state.bind("<Button-1>", lambda e: webbrowser.open("https://github.com/hxz393/BaiduPanFilesTransfers", new=0))
# 添加 trust_env 复选框
self.trust_env_var = BooleanVar()
self.trust_env_checkbutton = Checkbutton(self.root, text='使用系统代理', font=('Arial', 10,), variable=self.trust_env_var)
self.trust_env_checkbutton.grid(row=9, sticky=W, padx=84)

# 读取配置
if os.path.exists('config.ini'):
Expand Down Expand Up @@ -333,6 +335,7 @@ def main(self):
cookie = "".join(self.entry_cookie.get().split())
target_directory_name = "".join(self.entry_folder_name.get().split())
link_list = [sanitize_link(link + ' ') for link in self.text_links.get(1.0, END).split('\n') if link]
self.session.trust_env = self.trust_env_var.get()
completed_task_count = 0
total_task_count = len(link_list)
write_config(cookie)
Expand All @@ -344,6 +347,7 @@ def main(self):

# 开始运行函数
try:
print(self.session.trust_env)
# 检查链接数是否超限
self.check_condition(total_task_count > 1000, 'error', '转存链接数一次不能超过 1000,请减少链接数。')

Expand Down

0 comments on commit 9a7c68c

Please sign in to comment.