Skip to content

Commit

Permalink
Merge pull request #66 from livia-macon/Adjust_the_print_pdf_method
Browse files Browse the repository at this point in the history
Replacing title characters
  • Loading branch information
hhslepicka committed Sep 13, 2022
2 parents d8da757 + df9d891 commit 7c50ab2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions botcity/web/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import os
import platform
import random
import re
import shutil
import time
from typing import List
Expand Down Expand Up @@ -1066,6 +1067,7 @@ def print_pdf(self, path=None, print_options=None):
str: the saved file path
"""
title = self.page_title() or "document"
title = re.sub("[\\\\|/:–]", "", title)
timeout = 60000
default_path = os.path.expanduser(os.path.join(self.download_folder_path, f"{title}.pdf"))

Expand Down

0 comments on commit 7c50ab2

Please sign in to comment.