Spaces:
Running
Running
Hashir Kashif
commited on
Commit
·
3b93031
1
Parent(s):
61bc7ee
Add applicatiosdfsdfn file
Browse files- app.py +4 -3
- cookies/test.txt +0 -2
app.py
CHANGED
@@ -220,7 +220,7 @@ def getNetflixInfoWithApi(cookiefile):
|
|
220 |
if "login" in r.url:
|
221 |
print("Login Page")
|
222 |
os.remove(cookiefile)
|
223 |
-
thr = Thread(target=removeCookieFromServer,args=(cookiefile))
|
224 |
thr.start()
|
225 |
return "Not working"
|
226 |
else:
|
@@ -266,13 +266,13 @@ def getNetflixInfoWithApi(cookiefile):
|
|
266 |
f.write(str(e) + "\n\n")
|
267 |
f.close()
|
268 |
os.remove(cookiefile)
|
269 |
-
thr = Thread(target=removeCookieFromServer,args=(cookiefile))
|
270 |
thr.start()
|
271 |
return "Error occured"
|
272 |
else:
|
273 |
os.remove(cookiefile)
|
274 |
print("cookie removed")
|
275 |
-
thr = Thread(target=removeCookieFromServer,args=(cookiefile))
|
276 |
thr.start()
|
277 |
return "invalid cookie"
|
278 |
|
@@ -321,6 +321,7 @@ def sftp_connect():
|
|
321 |
ftp = ssh_client.open_sftp()
|
322 |
return ftp,ssh_client
|
323 |
def removeCookieFromServer(cookiefile):
|
|
|
324 |
ftp,ssh_client = sftp_connect()
|
325 |
ftp.remove("./domains/hashir672.serv00.net/public_html/Membership/"+cookiefile)
|
326 |
ssh_client.close()
|
|
|
220 |
if "login" in r.url:
|
221 |
print("Login Page")
|
222 |
os.remove(cookiefile)
|
223 |
+
thr = Thread(target=removeCookieFromServer,args=(cookiefile,))
|
224 |
thr.start()
|
225 |
return "Not working"
|
226 |
else:
|
|
|
266 |
f.write(str(e) + "\n\n")
|
267 |
f.close()
|
268 |
os.remove(cookiefile)
|
269 |
+
thr = Thread(target=removeCookieFromServer,args=(cookiefile,))
|
270 |
thr.start()
|
271 |
return "Error occured"
|
272 |
else:
|
273 |
os.remove(cookiefile)
|
274 |
print("cookie removed")
|
275 |
+
thr = Thread(target=removeCookieFromServer,args=(cookiefile,))
|
276 |
thr.start()
|
277 |
return "invalid cookie"
|
278 |
|
|
|
321 |
ftp = ssh_client.open_sftp()
|
322 |
return ftp,ssh_client
|
323 |
def removeCookieFromServer(cookiefile):
|
324 |
+
|
325 |
ftp,ssh_client = sftp_connect()
|
326 |
ftp.remove("./domains/hashir672.serv00.net/public_html/Membership/"+cookiefile)
|
327 |
ssh_client.close()
|
cookies/test.txt
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
|
2 |
-
a
|
|
|
|
|
|