Spaces:
Running
Running
Hashir Kashif
commited on
Commit
·
94b7011
1
Parent(s):
aefb92a
editing99999990999asasdasdasdasasdasdd
Browse files
app.py
CHANGED
@@ -188,18 +188,26 @@ def testTask():
|
|
188 |
def backupTask(location,filename):
|
189 |
for file in glob.glob("./Membership/*.txt"):
|
190 |
os.remove(file)
|
191 |
-
|
192 |
session = ftplib.FTP('hashir672.serv00.net','f6857_hashir_serv00','Hashirisbest@1122')
|
|
|
193 |
session.voidcmd("NOOP")
|
|
|
194 |
session.cwd('./public_html/Membership')
|
|
|
195 |
files = session.nlst()
|
|
|
196 |
files.remove(".")
|
|
|
197 |
files.remove("..")
|
|
|
198 |
for file in files:
|
199 |
# print(file)
|
200 |
r = requests.get("https://hashir672.serv00.net/Membership/"+file)
|
201 |
open("./Membership/"+file,"wb").write(r.content)
|
|
|
202 |
session.quit()
|
|
|
203 |
|
204 |
archived = shutil.make_archive('./'+filename, 'zip', location)
|
205 |
header = {
|
|
|
188 |
def backupTask(location,filename):
|
189 |
for file in glob.glob("./Membership/*.txt"):
|
190 |
os.remove(file)
|
191 |
+
print('1')
|
192 |
session = ftplib.FTP('hashir672.serv00.net','f6857_hashir_serv00','Hashirisbest@1122')
|
193 |
+
print('1')
|
194 |
session.voidcmd("NOOP")
|
195 |
+
print('1')
|
196 |
session.cwd('./public_html/Membership')
|
197 |
+
print('1')
|
198 |
files = session.nlst()
|
199 |
+
print('1')
|
200 |
files.remove(".")
|
201 |
+
print('1')
|
202 |
files.remove("..")
|
203 |
+
print('1')
|
204 |
for file in files:
|
205 |
# print(file)
|
206 |
r = requests.get("https://hashir672.serv00.net/Membership/"+file)
|
207 |
open("./Membership/"+file,"wb").write(r.content)
|
208 |
+
print('1')
|
209 |
session.quit()
|
210 |
+
print('1')
|
211 |
|
212 |
archived = shutil.make_archive('./'+filename, 'zip', location)
|
213 |
header = {
|