@@ -45,7 +45,7 @@ def __init__(self):
45
45
self ._timeout = 15 # 每个请求的超时(不包含下载响应体的用时)
46
46
self ._max_size = 100 # 单个文件大小上限 MB
47
47
self ._upload_delay = (0 , 0 ) # 文件上传延时
48
- self ._host_url = 'https://pan.lanzoui .com'
48
+ self ._host_url = 'https://pan.lanzouo .com'
49
49
self ._doupload_url = 'https://pc.woozooo.com/doupload.php'
50
50
self ._account_url = 'https://pc.woozooo.com/account.php'
51
51
self ._mydisk_url = 'https://pc.woozooo.com/mydisk.php'
@@ -83,11 +83,11 @@ def _post(self, url, data, **kwargs):
83
83
def _all_possible_urls (url : str ) -> List [str ]:
84
84
"""蓝奏云的主域名有时会挂掉, 此时尝试切换到备用域名"""
85
85
available_domains = [
86
- 'lanzoui .com' , # 鲁ICP备15001327号-6, 2020-06-09, SEO 排名最低
87
- 'lanzoux .com' , # 鲁ICP备15001327号-5 , 2020-06-09
88
- 'lanzous .com' # 主域名, 备案异常, 部分地区已经无法访问
86
+ 'lanzouw .com' , # 鲁ICP备15001327号-7, 2021-09-02
87
+ 'lanzoui .com' , # 鲁ICP备15001327号-6 , 2020-06-09
88
+ 'lanzoux .com' # 鲁ICP备15001327号-5, 2020-06-09
89
89
]
90
- return [url .replace ('lanzous .com' , d ) for d in available_domains ]
90
+ return [url .replace ('lanzouo .com' , d ) for d in available_domains ]
91
91
92
92
def ignore_limits (self ):
93
93
"""解除官方限制"""
@@ -1046,14 +1046,13 @@ def down_file_by_url(self, share_url, pwd='', save_path='./Download', *, callbac
1046
1046
f .seek (- 512 , os .SEEK_END )
1047
1047
last_512_bytes = f .read ()
1048
1048
file_info = un_serialize (last_512_bytes )
1049
- # Python3.6 序列化时默认使用 pickle 第三版协议,
1050
- # 导致计算时文件尾部多写了 5 字节, 保险期起见处理一下
1049
+ # Python3.7 序列化时默认使用 pickle 第三版协议,
1050
+ # 导致计算时文件尾部多写了 5 字节, 应该都是用3.8, 保险期起见处理一下
1051
1051
if not file_info :
1052
1052
is_protocol_3 = True
1053
1053
f .seek (- 517 , os .SEEK_END )
1054
1054
last_517_bytes = f .read ()
1055
1055
file_info = un_serialize (last_517_bytes )
1056
-
1057
1056
1058
1057
# 大文件的记录文件也可以反序列化出 name,但是没有 padding 字段
1059
1058
if file_info is not None and 'padding' in file_info :
@@ -1069,6 +1068,7 @@ def down_file_by_url(self, share_url, pwd='', save_path='./Download', *, callbac
1069
1068
# 截断最后 512 字节隐藏信息, 还原文件
1070
1069
with open (new_file_path , 'rb+' ) as f :
1071
1070
truncate_size = 517 if is_protocol_3 else 512
1071
+ logger .debug (f"Truncate last { truncate_size } bytes of file" )
1072
1072
f .seek (- truncate_size , os .SEEK_END )
1073
1073
f .truncate ()
1074
1074
file_path = new_file_path # 保存文件重命名后真实路径
0 commit comments