def isValid(login, passw):
grab = Grab(log_file='out.html')
#grab.setup(url="https://vk.com/login", proxy=pxy, proxy_type='http')
grab.go("https://vk.com/login")
grab.set_input("email", login)
grab.set_input("pass", passw)
grab.submit()
if (grab.response.url.find("__q_hash=")==-1):
return 0
else:
return 1