ePUB: Use function "pop" instead of "replace".
This commit is contained in:
parent
b81ff04c0d
commit
926c0341c6
1 changed files with 3 additions and 1 deletions
|
@ -1410,7 +1410,9 @@ def generate_document(data, url, ext, filename, readability=False):
|
|||
content = data
|
||||
match ext:
|
||||
case "epub":
|
||||
filename = filename.replace('.epub', '')
|
||||
filename = filename.split('.')
|
||||
filename.pop()
|
||||
filename = '.'.join(filename)
|
||||
error = generate_epub(content, filename)
|
||||
if error:
|
||||
logger.error(error)
|
||||
|
|
Loading…
Reference in a new issue