From 2c6de8bab01bd0309d7804a24bf3877a59b4d270 Mon Sep 17 00:00:00 2001 From: Pablo Delgado Date: Tue, 9 Feb 2021 17:44:24 +0100 Subject: [PATCH] Update main.py Corrected the issue #34 (books can't be downloaded if the filename contains symbol ) for errors in book names with ? --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index dd6f88d..e711e9f 100755 --- a/main.py +++ b/main.py @@ -206,7 +206,7 @@ def main(argv): file_types = get_book_file_types(user, book['productId']) for file_type in file_types: if file_type in book_file_types: # check if the file type entered is available by the current book - book_name = book['productName'].replace(' ', '_').replace('.', '_').replace(':', '_').replace('/','') + book_name = book['productName'].replace(' ', '_').replace('.', '_').replace(':', '_').replace('/','').replace('?','') if separate: filename = f'{root_directory}/{book_name}/{book_name}.{file_type}' move_current_files(root_directory, book_name)