Update app.py
Browse files
app.py
CHANGED
|
@@ -256,37 +256,8 @@ def getNetflixInfoWithApi(cookiefile):
|
|
| 256 |
target='en').translate(planName)
|
| 257 |
|
| 258 |
print(billingDate + " " + planName + " " + lang + " " +str(NetflixLocation))
|
| 259 |
-
try:
|
| 260 |
-
x = requests.get("https://help.netflix.com/en/node/123279/" +str(NetflixLocation[NetflixLocation.find("-")+1:]))
|
| 261 |
-
soup = BeautifulSoup(x.content, "html.parser")
|
| 262 |
-
extraMembebr = soup.findAll('p')
|
| 263 |
-
try:
|
| 264 |
-
for i in extraMembebr:
|
| 265 |
-
if("unavailable" in i.string):
|
| 266 |
-
# print(i)
|
| 267 |
-
extraMembebr = ""
|
| 268 |
-
|
| 269 |
-
except:
|
| 270 |
-
extraMembebr = "EM Available"
|
| 271 |
-
except:
|
| 272 |
-
pass
|
| 273 |
-
S = 3
|
| 274 |
-
ran = ''.join(
|
| 275 |
-
random.choices(string.ascii_uppercase + string.digits, k=S))
|
| 276 |
-
cookieFileName = billingDate + " " + planName + " " + lang + " "+str(NetflixLocation)+" "+extraMembebr+ " (" + str(ran) + ").txt"
|
| 277 |
-
newCookieFile = "./Membership/" + cookieFileName
|
| 278 |
-
shutil.move(
|
| 279 |
-
cookiefile, newCookieFile)
|
| 280 |
-
fixCookie(newCookieFile)
|
| 281 |
-
ftp,ssh_client = sftp_connect()
|
| 282 |
-
files = ftp.put(newCookieFile,"./domains/hashir672.serv00.net/public_html/Membership/"+cookieFileName)
|
| 283 |
-
|
| 284 |
|
| 285 |
-
|
| 286 |
-
# print('connection established successfully')
|
| 287 |
-
|
| 288 |
-
ssh_client.close()
|
| 289 |
-
os.remove(newCookieFile)
|
| 290 |
return "Working"
|
| 291 |
|
| 292 |
except Exception as e:
|
|
|
|
| 256 |
target='en').translate(planName)
|
| 257 |
|
| 258 |
print(billingDate + " " + planName + " " + lang + " " +str(NetflixLocation))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 259 |
|
| 260 |
+
os.remove(cookiefile)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 261 |
return "Working"
|
| 262 |
|
| 263 |
except Exception as e:
|