Small Fix

This commit is contained in:
bipinkrish
2023-02-23 21:48:08 +05:30
parent fce6b68473
commit b2759bc182
3 changed files with 11 additions and 4 deletions

View File

@@ -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"