Skip to content

Commit

Permalink
fix: 下载错误
Browse files Browse the repository at this point in the history
  • Loading branch information
Leon406 committed Jan 23, 2024
1 parent 1319af7 commit aca07e8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build_app.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# 本文件用于打包 MacOS 应用
# pyinstaller --clean --noconfirm build_app.spec

version = '0.6.11'
version = '0.6.12'
block_cipher = None


Expand Down
4 changes: 2 additions & 2 deletions lanzou/api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ def is_name_valid(filename: str) -> bool:

def is_file_url(share_url: str) -> bool:
"""判断是否为文件的分享链接"""
base_pat = r'https?://(\w[-\w]*\.)?lanzou[a-z].com/.+'
user_pat = r'https?://(\w[-\w]*\.)?lanzou[a-z].com/i[a-zA-Z0-9]{5,}(\?webpage=[a-zA-Z0-9]+?)?/?' # 普通用户 URL 规则
base_pat = r'https?://(\w[-\w]*\.)?(lanzou[a-z]|lan\w+)\.com/.+'
user_pat = r'https?://(\w[-\w]*\.)?(lanzou[a-z]|lan\w+)\.com/i[a-zA-Z0-9]{5,}(\?webpage=[a-zA-Z0-9]+?)?/?' # 普通用户 URL 规则
if not re.fullmatch(base_pat, share_url):
return False
elif re.fullmatch(user_pat, share_url):
Expand Down
2 changes: 1 addition & 1 deletion lanzou/gui/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = '0.6.11'
version = '0.6.12'

0 comments on commit aca07e8

Please sign in to comment.