UpLogin and UpSession

class qqqr.up.UpWebLogin(client, uin, pwd, h5=True, app=None, proxy=None, info=None, fake_ip=None)

在 0.13.0.dev1 版本发生变更: TeaEncoder is the unique PasswdEncoder. NodeEncoder is removed.

async new()

Create a UpWebSession. This will trigger a GET to xlogin url.

抛出:

aiohttp.ClientResponseError – if response status != 200

返回类型:

UpWebSession

返回:

a up login session

async check(sess)

This will call check api of Qzone, and receive result about whether this login needs a captcha, sms verification, etc.

参数:

sess (UpWebSession) – Session got from new().

async send_sms_code(sess)

Send verify sms (to get dynamic code)

参数:

sess (UpWebSession) – The up login session to send sms code

async try_login(sess)

Check if current session meets the login condition. It takes a session object and returns response of this try.

参数:

sess (UpWebSession) – Store the session information

返回类型:

LoginResp

返回:

A login response

async login()

Block until cookie is received.

class qqqr.up.UpH5Login(client, uin, pwd, h5=True, app=None, proxy=None, info=None, fake_ip=None)
async check(sess)

This will call check api of Qzone, and receive result about whether this login needs a captcha, sms verification, etc.

参数:

sess (UpWebSession) – Session got from new().