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 uniquePasswdEncoder
.NodeEncoder
is removed.- async new()¶
Create a
UpWebSession
. This will trigger a GET toxlogin
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 fromnew()
.
- 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- 返回类型:
- 返回:
A login response
- async login()¶
Block until cookie is received.