From b2759bc182fe2c391260d6d9f7914876941bf364 Mon Sep 17 00:00:00 2001 From: bipinkrish Date: Thu, 23 Feb 2023 21:48:08 +0530 Subject: [PATCH] Small Fix --- DeGourou.py | 5 +++++ README.md | 6 +++--- setup/fulfill.py | 4 +++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/DeGourou.py b/DeGourou.py index 6f6286e..92a6655 100644 --- a/DeGourou.py +++ b/DeGourou.py @@ -32,5 +32,10 @@ else: print("Not in supported file formats") print() exit(1) + +from os import remove, rename +remove(enrcyptedFile) +rename(decryptedFile,enrcyptedFile) +decryptedFile = enrcyptedFile print(decryptedFile) print() \ No newline at end of file diff --git a/README.md b/README.md index 9ea92e7..9c4d4ff 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ 1. Adobe Account (dummy account recommended) 2. Internet Archive Account 3. ACSM file from the book page you borrowded from Internet Archive -4. Python v3.x.x Installed with pip +4. Python v3.x.x Installed with pip (not required for normal users) --- @@ -21,7 +21,7 @@ 1. Download binary file according to your operating system from [Releases Section](https://github.com/bipinkrish/DeGourou/releases) 2. Run the binary according to operating system - A. Windows user's can just simply run the .exe + A. Windows user's can just simply run the DeGourou-windows.exe B. Linux user's need to change the file permission and then can run @@ -34,7 +34,7 @@ ### For Developers -1. Clone the repositary or Downlaod zip file and extract it +1. Clone the repositary or Download zip file and extract it 2. Install requirements using pip 3. Run "DeGourou" file diff --git a/setup/fulfill.py b/setup/fulfill.py index ff657cc..a2d7a61 100644 --- a/setup/fulfill.py +++ b/setup/fulfill.py @@ -47,7 +47,9 @@ def download(replyData): try: metadata_node = adobe_fulfill_response.find("./%s/%s/%s" % (adNS("fulfillmentResult"), adNS("resourceItemInfo"), adNS("metadata"))) book_name = metadata_node.find("./%s" % (adDC("title"))).text - book_name = ''.join([c for c in book_name if c not in '\/:*?"<>|']) + # removing illegal characters for filename + book_name = book_name.replace(":","-") + book_name = ''.join([c for c in book_name if c not in '\/*?"<>|']) except: book_name = "Book"