diff --git a/DeGourou.py b/DeGourou.py index 83f1cfe..787312a 100644 --- a/DeGourou.py +++ b/DeGourou.py @@ -51,6 +51,9 @@ def main(acsmFile, outputFilename): print() # decrypt + if encryptedFile is None: + print("Failed to Download, try decrypting from ACSM file") + return if encryptedFile.endswith(".pdf"): decryptedFile = decryptPDF(encryptedFile) elif encryptedFile.endswith(".epub"): diff --git a/README.md b/README.md index 64470d6..fbe5074 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,39 @@ python DeGourou.py ``` --- +## Examples + +* #### Loging in your InternetArchive account + +``` +.\DeGourou-windows.exe -li -e abc@email.com -p myemailpassword +``` +* #### To download from URL (only if your are logged in): + +``` +.\DeGourou-windows.exe -u https://archive.org/details/identifier +``` + +* #### To download from ACSM file + +``` +.\DeGourou-windows.exe -f URLLINK.acsm +``` + +--- + +## Advices + +* Apply for [Print Disability access](https://docs.google.com/forms/d/e/1FAIpQLScSBbT17HSQywTm-fQawOK7G4dN-QPbDWNstdfvysoKTXCjKA/viewform) for encountering minimal errors while downloading from URL + +* For rare books, you only able to borrow for 1hr, so to get the ACSM file from it, you have to use this below link, once after you clicked borrow + + https://archive.org/services/loans/loan/?action=media_url&format=pdf&redirect=1&identifier=XXX + + replace XXX with the identifier of the book, you can also change the format from "pdf" to "epub" + +--- ## Credits This project is based on the following projects: diff --git a/setup/fulfill.py b/setup/fulfill.py index 9758773..15a99a5 100644 --- a/setup/fulfill.py +++ b/setup/fulfill.py @@ -127,5 +127,6 @@ def downloadFile(file="URLLink.acsm"): success = download(replyData) if (success is False): print("That didn't work!") + return None else: return success