mirror of
https://github.com/KnugiHK/WhatsApp-Chat-Exporter.git
synced 2026-07-13 01:08:15 +02:00
Fix for bug 215, ignore missing contacts database.
This commit is contained in:
@@ -101,33 +101,40 @@ class BackupExtractor:
|
|||||||
decrypt_chunk_size=self.decrypt_chunk_size,
|
decrypt_chunk_size=self.decrypt_chunk_size,
|
||||||
)
|
)
|
||||||
logging.info(f"iOS backup is opened successfully")
|
logging.info(f"iOS backup is opened successfully")
|
||||||
logging.info("Decrypting WhatsApp database...", extra={"clear": True})
|
logging.info("Decrypting WhatsApp database...")
|
||||||
try:
|
try:
|
||||||
self.backup.extract_file(
|
try:
|
||||||
relative_path=RelativePath.WHATSAPP_MESSAGES,
|
self.backup.extract_file(
|
||||||
domain_like=self.identifiers.DOMAIN,
|
relative_path=RelativePath.WHATSAPP_MESSAGES,
|
||||||
output_filename=self.identifiers.MESSAGE,
|
domain_like=self.identifiers.DOMAIN,
|
||||||
)
|
output_filename=self.identifiers.MESSAGE,
|
||||||
self.backup.extract_file(
|
)
|
||||||
relative_path=RelativePath.WHATSAPP_CONTACTS,
|
except FileNotFoundError:
|
||||||
domain_like=self.identifiers.DOMAIN,
|
logging.error(
|
||||||
output_filename=self.identifiers.CONTACT,
|
"Essential WhatsApp files are missing from the iOS backup. "
|
||||||
)
|
"Perhapse you enabled end-to-end encryption for the backup? "
|
||||||
self.backup.extract_file(
|
"See https://wts.knugi.dev/docs.html?dest=iose2e"
|
||||||
relative_path=RelativePath.WHATSAPP_CALLS,
|
)
|
||||||
domain_like=self.identifiers.DOMAIN,
|
exit(6)
|
||||||
output_filename=self.identifiers.CALL,
|
try:
|
||||||
)
|
self.backup.extract_file(
|
||||||
|
relative_path=RelativePath.WHATSAPP_CONTACTS,
|
||||||
|
domain_like=self.identifiers.DOMAIN,
|
||||||
|
output_filename=self.identifiers.CONTACT,
|
||||||
|
)
|
||||||
|
except FileNotFoundError:
|
||||||
|
logging.warning(f"Contact database not found. Skipping...")
|
||||||
|
try:
|
||||||
|
self.backup.extract_file(
|
||||||
|
relative_path=RelativePath.WHATSAPP_CALLS,
|
||||||
|
domain_like=self.identifiers.DOMAIN,
|
||||||
|
output_filename=self.identifiers.CALL,
|
||||||
|
)
|
||||||
|
except FileNotFoundError:
|
||||||
|
logging.warning(f"Call database not found. Skipping...")
|
||||||
except ValueError:
|
except ValueError:
|
||||||
logging.error("Failed to decrypt backup: incorrect password?")
|
logging.error("Failed to decrypt backup: incorrect password?")
|
||||||
exit(7)
|
exit(7)
|
||||||
except FileNotFoundError:
|
|
||||||
logging.error(
|
|
||||||
"Essential WhatsApp files are missing from the iOS backup. "
|
|
||||||
"Perhapse you enabled end-to-end encryption for the backup? "
|
|
||||||
"See https://wts.knugi.dev/docs.html?dest=iose2e"
|
|
||||||
)
|
|
||||||
exit(6)
|
|
||||||
else:
|
else:
|
||||||
logging.info(f"WhatsApp database decrypted successfully")
|
logging.info(f"WhatsApp database decrypted successfully")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user