mirror of
https://gitea.com/bipinkrish/DeGourou.git
synced 2024-11-17 05:50:21 +00:00
Update DeGourou/setup/fulfill.py (#4)
add filename truncation to ensure safe filenames might come back and add filesytem checking later to determine safe filename length Reviewed-on: https://gitea.com/bipinkrish/DeGourou/pulls/4 Co-authored-by: TheSquashy <thesquashy@noreply.gitea.com> Co-committed-by: TheSquashy <thesquashy@noreply.gitea.com>
This commit is contained in:
parent
7984a6d655
commit
ea970edbd9
1 changed files with 3 additions and 1 deletions
|
@ -16,6 +16,8 @@ from .libadobe import sendHTTPRequest_DL2FILE
|
|||
from .libadobeFulfill import buildRights, fulfill
|
||||
from .libpdf import patch_drm_into_pdf
|
||||
|
||||
|
||||
maxlen = 60 # probably a good middle ground? will work on ext3/4, ntfs, win10/11 and probably mac
|
||||
#######################################################################
|
||||
|
||||
|
||||
|
@ -49,7 +51,7 @@ def download(replyData):
|
|||
except:
|
||||
book_name = "Book"
|
||||
|
||||
|
||||
book_name = book_name[0:maxlen]
|
||||
# Download eBook:
|
||||
|
||||
print(download_url)
|
||||
|
|
Loading…
Reference in a new issue