fixed %20 and replace it with a dash

This commit is contained in:
maru21 2024-11-22 15:14:52 +01:00
parent 63e6f2aea9
commit 9dc69fbaff

View File

@ -98,6 +98,7 @@ def download_pdf(pdf_link):
return
file_name = os.path.basename(urlparse(actual_file_url).path) or "downloaded_file.pdf"
file_name = file_name.replace('%20', '-') # Replace '%20' with dashes
data_dir = os.path.join(SCRIPT_DIR, "data")
file_path = os.path.join(data_dir, file_name)