Browse Source

Fix minor bug in file saving

main
Noëlle 2 years ago
parent
commit
7dade70d6d
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      main.py

+ 1
- 1
main.py View File

@@ -91,7 +91,7 @@ def main(args: dict) -> None:
print(f"Found '{pres_page_title}'. Finding PDF...")
for pdf_tag in pres_page_soup.find_all("a", href=re.compile("pdfviewer")):
pdf_name = pdf_tag["href"].split("/")[-1]
file_name = f"{pres_page_title.replace(' ', '_')}-{pdf_name}"
file_name = f"{pres_page_title.replace(' ', '_').replace('/', '-')}-{pdf_name}"
pdf_request = infovaya_session.get(f"{INFOVAYA_ROOT}{pdf_tag['href'][1:]}")
pdf_request.raise_for_status()
if b"Download Quota Exceeded" in pdf_request.content:

Loading…
Cancel
Save