sinky / whatsapp-chat-export-viewer

WhatsApp Chat Export Javascript Viewer
MIT License
19 stars 6 forks source link

Not fully working with new WhatsApp export #2

Closed saschadd closed 4 months ago

saschadd commented 6 months ago

Hi, first of all a big thanks for this very easy to setup and very useful project which helps to solve a problem a big tech company is not able or more not willing to solve to keep users in their microcosmos. But thats a different story. ;)

Well, I combined it with TinyWeb and had it setup and runnig within 10 minutes. Only thing left was to reformat the backup file as the timestamp has changed from [16.07.21, 15:03:00] Username: blabla... to 20.01.22, 13:30 - Username: blabla...

I got this fixed with a regex search and replace in Notepad++ Search for: ([0-9]{2})..[,] :[ ][-] and replace it with [\1.\2.\3, \4:\5:00] and it is recognized.

Only thing i could solve (yet) is the line.replace part for the media files. As there is no media file linked in the sample data i am not sure what to change. The line with an attachment nowadays looks like that for example

15.11.21, 15:28 - Username: ‎IMG-20211115-WA0010.jpg (Datei angehängt) blabla...

Maybe you see what has to be changed and give me a hint?! ;)

sinky commented 6 months ago

Hey, it seems you are using the Android Version of WhatsApp. Because this is the current format on iOS: ‎[27.10.23, 22:42:29] Username: ‎<Anhang: 00000009-PHOTO-2023-10-27-22-42-29.jpg>

I've added an additional line.replace that should account for your format: https://github.com/sinky/whatsapp-chat-export-viewer/blob/main/app.js#L56

saschadd commented 4 months ago

Hey Marco, yes, you are right, its the Android Version of WhatsApp. Thanks for the quick fix which worked well after escaping the brackets.

I played around a bit more and to adopt it to the Android version of the export file. It works so far but somehow it stops after some lines out of the blue so i might have missed some counter or such.

EDIT: I double checked everything and found what i did wrong. Everything was correct but I activated the debug line

        // Debug: Import kürzen
        //lines = lines.slice(0, 200)

; ) So everything is fine and working after disabling the debug part.

Gurulam commented 4 months ago

Hi, first of all a big thanks for this very easy to setup and very useful project which helps to solve a problem a big tech company is not able or more not willing to solve to keep users in their microcosmos. But thats a different story. ;)

Well, I combined it with TinyWeb and had it setup and runnig within 10 minutes. Only thing left was to reformat the backup file as the timestamp has changed from [16.07.21, 15:03:00] Username: blabla... to 20.01.22, 13:30 - Username: blabla...

I got this fixed with a regex search and replace in Notepad++ Search for: ([0-9]{2})..[,] :[ ][-] and replace it with [\1.\2.\3, \4:\5:00] and it is recognized.

Only thing i could solve (yet) is the line.replace part for the media files. As there is no media file linked in the sample data i am not sure what to change. The line with an attachment nowadays looks like that for example

15.11.21, 15:28 - Username: ‎IMG-20211115-WA0010.jpg (Datei angehängt) blabla...

Maybe you see what has to be changed and give me a hint?! ;)

Hi, I have tried to replicate your proposed solution, however, it is not possible to display the content of the message when running sinky's app, could you share the file with the modification you made. Greetings.

Gurulam commented 4 months ago

Hey, it seems you are using the Android Version of WhatsApp. Because this is the current format on iOS: ‎[27.10.23, 22:42:29] Username: ‎<Anhang: 00000009-PHOTO-2023-10-27-22-42-29.jpg>

I've added an additional line.replace that should account for your format: https://github.com/sinky/whatsapp-chat-export-viewer/blob/main/app.js#L56

Hi, your project is an excellent solution for uploading exported messages, I appreciate your initiative in creating it. Could you tell me if it also works for Whatsapp Groups?

Regards

sinky commented 4 months ago

Hey, it seems you are using the Android Version of WhatsApp. Because this is the current format on iOS: ‎[27.10.23, 22:42:29] Username: ‎<Anhang: 00000009-PHOTO-2023-10-27-22-42-29.jpg> I've added an additional line.replace that should account for your format: https://github.com/sinky/whatsapp-chat-export-viewer/blob/main/app.js#L56

Hi, your project is an excellent solution for uploading exported messages, I appreciate your initiative in creating it. Could you tell me if it also works for Whatsapp Groups?

Regards

Hi and thank you. I have just created a fresh export of a chat group from WhapsApp on iOS. It works directly with the current code.