if not token_url:
return
token_base64 = token_url[token_url.find('token=') + len('token='):]
return base64.urlsafe_b64decode(token_base64)
https://github.com/viraj-bookanna/autoscan-tg-qr
can't install zbar you also give me http://api.qrserver.com what exactly could be the problem? It can’t be that the site badly decodes QR
def extract_token(token_url: str) -> bytes: if not token_url: return token_base64 = token_url[token_url.find('token=') + len('token='):] return base64.urlsafe_b64decode(token_base64) url = "tg://login?token=encoded_token_here" decoded_token = extract_token(url) print(decoded_token)
so i understand what is my error if i screen th qr code, it automatically becomes expired i photo it on my phone, fastly import to PC and that's work for me)
so, i just autorised quicker and it worked for me!
Обсуждают сегодня