Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion python/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from pathlib import Path
from datetime import *
import urllib.request
from urllib.parse import quote
from argparse import ArgumentParser, RawTextHelpFormatter, ArgumentTypeError
from enums import *

Expand All @@ -15,7 +16,9 @@ def get_destination_dir(file_url, folder=None):
return os.path.join(store_directory, file_url)

def get_download_url(file_url):
return "{}{}".format(BASE_URL, file_url)
# Ensure the URL is properly encoded to handle Chinese characters
encoded_url = quote(file_url, safe='/')
return "{}{}".format(BASE_URL, encoded_url)

def get_all_symbols(type):
if type == 'um':
Expand Down