automaciej / whatsapp-archive

Format your exported WhatsApp conversation in HTML
GNU General Public License v3.0
35 stars 15 forks source link

Can't parse the first line (RU format) #7

Closed Sogl closed 1 year ago

Sogl commented 4 years ago

Okay, here we go again: https://github.com/automatthias/whatsapp-archive/issues/1 and https://github.com/automatthias/whatsapp-archive/issues/4

Tried to use the script and got an error:

C:\WA>python whatsapp_archive.py -i recall.txt -o output.html
Traceback (most recent call last):
  File "whatsapp_archive.py", line 168, in <module>
    main()
  File "whatsapp_archive.py", line 160, in main
    messages = IdentifyMessages(fd.readlines())
  File "whatsapp_archive.py", line 72, in IdentifyMessages
    raise Error("Can't parse the first line: " + repr(line) +
__main__.Error: Can't parse the first line: '12.02.19, 14:22 - Сообщения 
в данной группе теперь защищены сквозным шифрованием. 
Подробнее.\n', regexes are FIRSTLINE_RE='\\[?(?P<date>[\\d/-]+),? (?P<time>[\\d:]+
( [AP]M)?)\\]?( - |: | )(?P<body>.*$)' and WHATSAPP_RE='\\[?(?P<date>[\\d/-]+),? 
(?P<time>[\\d:]+( [AP]M)?)\\]?( - |: | )(?P<name>[^:]+): (?P<body>.*$)'

My 1st line:

12.02.19, 14:22 - Сообщения в данной группе теперь защищены сквозным шифрованием. 
Подробнее.

It's standard diagnostic message in WhatsApp about end-to-end encryption. But I found that's the problem with date format. It's default Russian date: day.month.year hours:minutes

@automatthias Can you fix?

automaciej commented 4 years ago

@Sogl Can you show / paste / upload a fragment of your export file? You can remove any personal information from it, but I need to get the dates and the formatting exactly like in your export.

Sogl commented 4 years ago

Sure. I removed some personal pieces of text and changed the phone numbers:

17.02.19, 12:28 - +7 982 111-11-11: Пётр,  ждём! Развязки
17.02.19, 12:44 - +7 905 222-22-22: Так ночью ж😂
17.02.19, 17:21 - +7 987 333-33-33: https://www.ozon.ru/context/detail/id/3562175/
17.02.19, 18:01 - +7 903 444-44-44: Она там не продается, к сожалению.
17.02.19, 18:01 - +7 903 444-44-44: Но книга та, да.
17.02.19, 18:01 - +7 903 444-44-44: Так ее и не нашли нигде полностью на русском.
17.02.19, 19:19 - ‎Ольга Р Х (МСК) добавил(-а) контакт +7 909 555-55-55
17.02.19, 19:39 - +7 909 555-55-55: Всем привет 👋🏻
17.02.19, 19:39 - Петр П (И В): Много нас
17.02.19, 19:40 - +7 910 666-66-66: 🙌
17.02.19, 19:42 - Петр П (И В): Новые люди! Напишите несколько слов о себе. Кто недавно присоединился. Кто вы и откуда вы.
17.02.19, 19:50 - +7 921 777-77-77: Здравствуйте! Я присоединилась вчера. Т.
17.02.19, 19:50 - +7 926 888-88-88: А, косметолог, мама. 
Искала  рабочие методы по о.... А так же способы лечить... В итоге я на семинаре. На 2-ой день начала з.... Сегодня 6-ой день обучения - у меня осталось... 
Счастлива оказаться в вашем пространстве 🙏🏼🙏🏼🙏🏼🌈