Client for Discord authorization via qr code
Project description
RemoteAuthClient
Installing
Python 3.7 or higher is required
pip install remoteauthclient
Example
from asyncio import run
from remoteauthclient import RemoteAuthClient
c = RemoteAuthClient()
@c.event("on_fingerprint")
async def on_fingerprint(data):
print(f"Fingerprint: {data}")
print(f"QrCode url: https://api.qrserver.com/v1/create-qr-code/?size=256x256&data={data}")
@c.event("on_userdata")
async def on_userdata(user):
print(f"ID: {user.id}")
print(f"Username: {user.username}")
print(f"Discriminator: {user.discriminator}")
print(f"Avatar hash: {user.avatar}")
print(f"Name: {user.getName()}")
print(f"Avatar URL: {user.getAvatarURL()}")
@c.event("on_token")
async def on_token(token):
print(f"Token: {token}")
@c.event("on_cancel")
async def on_cancel():
print(f"Auth canceled!")
@c.event("on_timeout")
async def on_timeout():
print(f"Timeout")
@c.event("on_captcha")
async def on_captcha(captcha_data):
# captcha_data contains captcha_sitekey, captcha_service (hcaptcha), captcha_rqdata and captcha_rqtoken
print(f"Captcha!")
captcha_key = ... # Solve captcha and get captcha_key
return captcha_key
@c.event("on_error")
async def on_error(exc, client):
print(f"Error: {exc.__class__.__name__}")
if client.retries == 1:
await client.run_task()
run(c.run())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for remoteauthclient-1.4.0b0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae7e5a0009b20b9e36ce051fba0d24ed0d5f326b650e6c1d0154091e8b2a1335 |
|
MD5 | 4ecfce05405ef2d41bab5723e2b42d65 |
|
BLAKE2b-256 | 8528cd0968e4fa4a0af8bc61fab5c460f9688e836dc193915a3896de7a456e24 |