fixed %20 and replace it with a dash
This commit is contained in:
parent
63e6f2aea9
commit
9dc69fbaff
@ -98,6 +98,7 @@ def download_pdf(pdf_link):
|
|||||||
return
|
return
|
||||||
|
|
||||||
file_name = os.path.basename(urlparse(actual_file_url).path) or "downloaded_file.pdf"
|
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")
|
data_dir = os.path.join(SCRIPT_DIR, "data")
|
||||||
file_path = os.path.join(data_dir, file_name)
|
file_path = os.path.join(data_dir, file_name)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user