#登录接口

Posted huhanqing

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了#登录接口相关的知识,希望对你有一定的参考价值。

database = {‘hu‘:‘3610‘,‘quan‘:‘8783‘}


count = 0
while count < 3:
    username = input(‘Please enter your username\n‘)
    password = input(‘Please enter your password\n‘)
    if username in database:
        if database.get(username) == password:
            print(‘Welcome to the user‘)
            break
        else:
            print(‘The user name or password error‘)
            count +=1
    else:
        print(‘The user name or password error‘)
        count +=1


while count == 3:       
    input()
    print(‘You have been locked‘)
    continue

以上是关于#登录接口的主要内容,如果未能解决你的问题,请参考以下文章

使用$.ajax调用接口,返回登录页面,所以我想先用ajax将用户名密码传给登录接口。返回成功但没有记住登录

接口测试之保持登录状态

requests---发送post请求完成登录

用户模块-登录接口完整code

python编写登录接口

python编写登录接口