mirror of
https://github.com/flibusta-apps/books_downloader.git
synced 2025-12-06 15:05:37 +01:00
Fix zip with elector
This commit is contained in:
@@ -16,7 +16,7 @@ def unzip(temp_zipfile, file_type: str):
|
|||||||
|
|
||||||
zip_file = zipfile.ZipFile(temp_zipfile)
|
zip_file = zipfile.ZipFile(temp_zipfile)
|
||||||
for name in zip_file.namelist(): # type: str
|
for name in zip_file.namelist(): # type: str
|
||||||
if file_type.lower() in name.lower():
|
if file_type.lower() in name.lower() or name.lower() == "elector":
|
||||||
with zip_file.open(name, "r") as internal_file:
|
with zip_file.open(name, "r") as internal_file:
|
||||||
while chunk := internal_file.read(2048):
|
while chunk := internal_file.read(2048):
|
||||||
result.write(chunk)
|
result.write(chunk)
|
||||||
|
|||||||
Reference in New Issue
Block a user