-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWS.py
86 lines (81 loc) · 2.26 KB
/
WS.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import os
from Lib import*
try:
os.mkdir("Statuses")
except:
pass
try:
os.mkdir("Statuses/Images")
except:
pass
try:
os.mkdir("Statuses/Videos")
except:
pass
print("Installing requirements...")
os.system("pip3 install pyfiglet")
clear()
from pyfiglet import Figlet
k = Figlet(font='standard')
print (k.renderText('WhatsSaver'))
print(" ---by DarkGuySM")
import shutil
import glob
if os.path.exists("/storage/emulated/0/WhatsApp/Media/.Statuses/"):
mp4s=glob.glob("/storage/emulated/0/WhatsApp/Media/.Statuses/*.mp4")
gps=glob.glob("/storage/emulated/0/WhatsApp/Media/.Statuses/*.3gp")
jpgs=glob.glob("/storage/emulated/0/WhatsApp/Media/.Statuses/*.jpg")
pngs=glob.glob("/storage/emulated/0/WhatsApp/Media/.Statuses/*.png")
else:
mp4s=glob.glob("/storage/emulated/0/Android/Media/com.whatsapp/WhatsApp/Media/.Statuses/*.mp4")
gps=glob.glob("/storage/emulated/0/Android/Media/com.whatsapp/WhatsApp/Media/.Statuses*.3gp")
jpgs=glob.glob("/storage/emulated/0/Android/Media/com.whatsapp/WhatsApp/Media/.Statuses/*.jpg")
pngs=glob.glob("/storage/emulated/0/Android/Media/com.whatsapp/WhatsApp/Media/.Statuses/*.png")
ver=("Enter 1 to save images.\nEnter 2 to save videos.")
print("-"*67)
print(" ")
print(ver)
print(" ")
print("Warning! All statuses previously saved using this tool will be deleted!!")
print(" ")
wd=os.getcwd()
def wa():
chk=input("Enter choice>> ")
if chk=='1':
lst=os.listdir("Statuses/Images")
wrk=os.getcwd()
for i in lst:
os.remove(wrk+"/Statuses/Images/"+i)
for jpg in jpgs:
shutil.copy(jpg,"Statuses/Images")
jpg_rnm()
for png in pngs:
shutil.copy(png,wd+"/Statuses/Images")
png_rnm()
elif chk=='2':
lst=os.listdir("Statuses/Videos/")
wrk=os.getcwd()
for i in lst:
os.remove(wrk+"/Statuses/Videos/"+i)
for mp4 in mp4s:
shutil.copy(mp4,"Statuses/Videos")
mp_rnm()
os.chdir(wd)
for gp in gps:
shutil.copy(gp,"Statuses/Videos")
gp_rnm()
else:
clear()
print(k.renderText('WhatsSaver'))
print(" ---by DarkGuySM")
print("-"*67)
print(" ")
print(ver)
print(" ")
print("Warning! All statuses previously saved using this tool will be deleted!!")
print(" ")
print("Please enter correct option..")
wa()
wa()
print(" ")
print("Done! ")