Hashir Kashif
commited on
Commit
·
4e2ec25
1
Parent(s):
94b7011
editing99999990999asasdasdasdasasdasddasd
Browse files
app.py
CHANGED
|
@@ -13,7 +13,7 @@ from threading import Thread
|
|
| 13 |
import time
|
| 14 |
import json
|
| 15 |
from urllib.parse import unquote
|
| 16 |
-
import
|
| 17 |
os.remove("./cookies/test.txt")
|
| 18 |
|
| 19 |
class Unbuffered(object):
|
|
@@ -185,29 +185,30 @@ def testTask():
|
|
| 185 |
getNetflixInfo("./cookie.txt")
|
| 186 |
os.chdir("../")
|
| 187 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 188 |
def backupTask(location,filename):
|
| 189 |
for file in glob.glob("./Membership/*.txt"):
|
| 190 |
os.remove(file)
|
| 191 |
print('1')
|
| 192 |
-
session =
|
| 193 |
-
print(
|
| 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 = {
|
|
|
|
| 13 |
import time
|
| 14 |
import json
|
| 15 |
from urllib.parse import unquote
|
| 16 |
+
from ftplib import FTP_TLS
|
| 17 |
os.remove("./cookies/test.txt")
|
| 18 |
|
| 19 |
class Unbuffered(object):
|
|
|
|
| 185 |
getNetflixInfo("./cookie.txt")
|
| 186 |
os.chdir("../")
|
| 187 |
|
| 188 |
+
def connect():
|
| 189 |
+
ftp = FTP_TLS()
|
| 190 |
+
ftp.debugging = 2
|
| 191 |
+
ftp.connect('hashir672.serv00.net')
|
| 192 |
+
ftp.login('f6857_hashir_serv00', 'Hashirisbest@1122')
|
| 193 |
+
return ftp
|
| 194 |
+
|
| 195 |
+
|
| 196 |
def backupTask(location,filename):
|
| 197 |
for file in glob.glob("./Membership/*.txt"):
|
| 198 |
os.remove(file)
|
| 199 |
print('1')
|
| 200 |
+
session = connect()
|
| 201 |
+
print("1")
|
| 202 |
session.voidcmd("NOOP")
|
|
|
|
| 203 |
session.cwd('./public_html/Membership')
|
|
|
|
| 204 |
files = session.nlst()
|
|
|
|
| 205 |
files.remove(".")
|
|
|
|
| 206 |
files.remove("..")
|
|
|
|
| 207 |
for file in files:
|
| 208 |
# print(file)
|
| 209 |
r = requests.get("https://hashir672.serv00.net/Membership/"+file)
|
| 210 |
open("./Membership/"+file,"wb").write(r.content)
|
|
|
|
| 211 |
session.quit()
|
|
|
|
| 212 |
|
| 213 |
archived = shutil.make_archive('./'+filename, 'zip', location)
|
| 214 |
header = {
|