Hotmail登录!
import poplib
M = poplib.POP3_SSL('pop3.live.com', 995) #Connect to hotmail pop3 server
try:
M.user(raw_input("username: ")) #Get the username from the standar input
M.pass_(raw_input("password: ")) #Get the password from the standar input
except:
print "username or password incorrect"
else:
print "Successful login"
Run Code Online (Sandbox Code Playgroud)
编辑:因为您只需要知道您是否可以登录,我会重写代码
如果在输入用户名或密码时丢失连接,我不知道会发生什么.
| 归档时间: |
|
| 查看次数: |
5261 次 |
| 最近记录: |