Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacing title characters #66

Merged
merged 2 commits into from
Sep 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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