From 9fedd3913dc2c797a4b7dd8261a47424b5d02fce Mon Sep 17 00:00:00 2001 From: sasi Date: Wed, 8 Dec 2021 11:50:35 +0530 Subject: [PATCH 1/8] Date and time issue in whatsapp chat --- .DS_Store | Bin 0 -> 6148 bytes src/chat_analyzer.py | 116 +++++++++++++++++++++++++++++++------ tests/.DS_Store | Bin 0 -> 6148 bytes tests/test_chats/.DS_Store | Bin 0 -> 6148 bytes 4 files changed, 99 insertions(+), 17 deletions(-) create mode 100644 .DS_Store create mode 100644 tests/.DS_Store create mode 100644 tests/test_chats/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..ac713db6418ccd8f1becaaf4e906fdb173607add GIT binary patch literal 6148 zcmeHKO-lnY5PfMYws`4Hk9*XEE}p%t{WyqUpomxP2Uu*ob-RV?X@7=)!QbZ(&^Jja z-L0Yr5s?{4UNV`P%)G#61Hd$9y?vk#pvop#sfHLp{4DiktsctybUKvmZlz{~U@_h){1S5}`L;LAqXP*GX3e{FP zw!i+wKorEtW9E<=igB()=W6^D!}ynjaqe7?ynW`-xx?6<8OQHz{0qhShldHQIZWhG zdu2cw$TLuO)4JUM?a$x;c_*DI1Ioa^V!%{dm#qd%@^|Y>adOuNY&UEoVwX8wxNu;v gV%o}8yv1gP`alN6$YbV^8jAi1SQ@lb27Z-+cY^$Mp8x;= literal 0 HcmV?d00001 diff --git a/src/chat_analyzer.py b/src/chat_analyzer.py index 662a0f8..e5a22df 100644 --- a/src/chat_analyzer.py +++ b/src/chat_analyzer.py @@ -20,12 +20,28 @@ """ # For Whatsapp chat exports WUser = r'(- (?P[^:]*):)' # To get the user's name -# To get the date -WDate = r'(?P(?P[0-9]{1,2})[-\/]{1}(?P[0-9]{1,2})[-\/]{1}(?P[0-9]{2}))' -# To get the time -WTime = r'(, (?P