本文整理汇总了Python中Yowsup.connectionmanager.YowsupConnectionManager.getMethodsInterface方法的典型用法代码示例。如果您正苦于以下问题:Python YowsupConnectionManager.getMethodsInterface方法的具体用法?Python YowsupConnectionManager.getMethodsInterface怎么用?Python YowsupConnectionManager.getMethodsInterface使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Yowsup.connectionmanager.YowsupConnectionManager
的用法示例。
在下文中一共展示了YowsupConnectionManager.getMethodsInterface方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from Yowsup.connectionmanager import YowsupConnectionManager [as 别名]
# 或者: from Yowsup.connectionmanager.YowsupConnectionManager import getMethodsInterface [as 别名]
def __init__(self, keepAlive=False, sendReceipts=False, dryRun=False):
self.sendReceipts = sendReceipts
self.dryRun = dryRun
# Initialize
connectionManager = YowsupConnectionManager()
connectionManager.setAutoPong(keepAlive)
self.signalsInterface = connectionManager.getSignalsInterface()
self.methodsInterface = connectionManager.getMethodsInterface()
# Configure the listeners
self.signalsInterface.registerListener("message_received", self.onMessageReceived)
self.signalsInterface.registerListener("group_messageReceived", self.onGroupMessageReceived)
self.signalsInterface.registerListener("image_received", self.onImageReceived)
self.signalsInterface.registerListener("group_imageReceived", self.onGroupImageReceived)
self.signalsInterface.registerListener("auth_success", self.onAuthSuccess)
self.signalsInterface.registerListener("auth_fail", self.onAuthFailed)
self.signalsInterface.registerListener("disconnected", self.onDisconnected)
# Create a printqueue so we won't print two things at the same time
self.queue = Queue.PriorityQueue()
self.history = [] #List of timestamp, action, item
self.printer = None
self.last_sender = None
self.connected = False
示例2: __init__
# 需要导入模块: from Yowsup.connectionmanager import YowsupConnectionManager [as 别名]
# 或者: from Yowsup.connectionmanager.YowsupConnectionManager import getMethodsInterface [as 别名]
def __init__(self):
self.sendReceipts = True
self.groupMembership = {}
self.groupParticipants = {}
connectionManager = YowsupConnectionManager()
connectionManager.setAutoPong(True)
self.signalsInterface = connectionManager.getSignalsInterface()
self.methodsInterface = connectionManager.getMethodsInterface()
self.signalsInterface.registerListener("message_received", self.onMessageReceived)
self.signalsInterface.registerListener("group_messageReceived", self.onGroupMessageReceived)
self.signalsInterface.registerListener("group_subjectReceived", self.onGroupSubjectReceived)
self.signalsInterface.registerListener("group_gotInfo", self.onGroupGotInfo)
self.signalsInterface.registerListener("group_gotParticipants", self.onGroupGotParticipants)
self.signalsInterface.registerListener("group_imageReceived", self.onGroupImageReceived)
self.signalsInterface.registerListener("group_videoReceived", self.onGroupVideoReceived)
self.signalsInterface.registerListener("group_audioReceived", self.onGroupAudioReceived)
self.signalsInterface.registerListener("group_locationReceived", self.onGroupLocationReceived)
self.signalsInterface.registerListener("group_vcardReceived", self.onGroupVcardReceived)
self.signalsInterface.registerListener("notification_groupParticipantRemoved", self.onNotificationGroupParticipantRemoved)
self.signalsInterface.registerListener("auth_success", self.onAuthSuccess)
self.signalsInterface.registerListener("auth_fail", self.onAuthFailed)
self.signalsInterface.registerListener("disconnected", self.onDisconnected)
self.cm = connectionManager
示例3: __init__
# 需要导入模块: from Yowsup.connectionmanager import YowsupConnectionManager [as 别名]
# 或者: from Yowsup.connectionmanager.YowsupConnectionManager import getMethodsInterface [as 别名]
def __init__(self, url, keepAlive = False, sendReceipts = False):
super(Server, self).__init__()
self.sendReceipts = sendReceipts
self.keepAlive = keepAlive
self.db = create_engine(url, echo=False, pool_size=10, pool_timeout=600,pool_recycle=300)
self.Session = sessionmaker(bind=self.db)
self.s = self.Session()
self.job = None
self.pubnub = Pubnub(os.environ['PUB_KEY'], os.environ['SUB_KEY'], None, False)
self.timeout = int(os.getenv('TIMEOUT', 3600))
connectionManager = YowsupConnectionManager(self.timeout)
connectionManager.setAutoPong(keepAlive)
self.signalsInterface = connectionManager.getSignalsInterface()
self.methodsInterface = connectionManager.getMethodsInterface()
self.signalsInterface.registerListener("message_received", self.onMessageReceived)
self.signalsInterface.registerListener("group_messageReceived", self.onGroupMessageReceived)
self.signalsInterface.registerListener("image_received", self.onImageReceived)
self.signalsInterface.registerListener("video_received", self.onVideoReceived)
self.signalsInterface.registerListener("audio_received", self.onAudioReceived)
self.signalsInterface.registerListener("vcard_received", self.onVCardReceived)
self.signalsInterface.registerListener("location_received", self.onLocationReceived)
self.signalsInterface.registerListener("receipt_messageSent", self.onReceiptMessageSent)
self.signalsInterface.registerListener("receipt_messageDelivered", self.onReceiptMessageDelivered)
self.signalsInterface.registerListener("auth_success", self.onAuthSuccess)
self.signalsInterface.registerListener("auth_fail", self.onAuthFailed)
self.signalsInterface.registerListener("disconnected", self.onDisconnected)
self.signalsInterface.registerListener("contact_gotProfilePicture", self.onGotProfilePicture)
self.signalsInterface.registerListener("profile_setStatusSuccess", self.onSetStatusSuccess)
self.signalsInterface.registerListener("group_createSuccess", self.onGroupCreateSuccess)
self.signalsInterface.registerListener("group_createFail", self.onGroupCreateFail)
self.signalsInterface.registerListener("group_gotInfo", self.onGroupGotInfo)
self.signalsInterface.registerListener("group_addParticipantsSuccess", self.onGroupAddParticipantsSuccess)
self.signalsInterface.registerListener("group_removeParticipantsSuccess", self.onGroupRemoveParticipantsSuccess)
self.signalsInterface.registerListener("group_imageReceived", self.onGroupImageReceived)
self.signalsInterface.registerListener("group_subjectReceived", self.onGroupSubjectReceived)
self.signalsInterface.registerListener("notification_removedFromGroup", self.onNotificationRemovedFromGroup)
self.signalsInterface.registerListener("notification_groupParticipantAdded", self.onNotificationGroupParticipantAdded)
self.signalsInterface.registerListener("group_gotParticipants", self.onGotGroupParticipants)
self.signalsInterface.registerListener("media_uploadRequestSuccess", self.onUploadRequestSuccess)
# self.signalsInterface.registerListener("media_uploadRequestFailed", self.onUploadRequestFailed)
self.signalsInterface.registerListener("media_uploadRequestDuplicate", self.onUploadRequestDuplicate)
self.signalsInterface.registerListener("presence_available", self.onPresenceAvailable)
self.signalsInterface.registerListener("presence_unavailable", self.onPresenceUnavailable)
self.cm = connectionManager
self.url = os.environ['URL']
self.post_headers = {'Content-type': 'application/json', 'Accept': 'application/json'}
self.done = False
示例4: __init__
# 需要导入模块: from Yowsup.connectionmanager import YowsupConnectionManager [as 别名]
# 或者: from Yowsup.connectionmanager.YowsupConnectionManager import getMethodsInterface [as 别名]
def __init__(self, phoneNumber):
self.sendReceipts = True
self.phoneNumber = phoneNumber
self.jid = "%[email protected]" % phoneNumber
self.sentCache = {}
connectionManager = YowsupConnectionManager()
connectionManager.setAutoPong(True)
self.signalsInterface = connectionManager.getSignalsInterface()
self.methodsInterface = connectionManager.getMethodsInterface()
self.signalsInterface.registerListener("auth_success", self.onAuthSuccess)
self.signalsInterface.registerListener("auth_fail", self.onAuthFailed)
self.signalsInterface.registerListener("message_received", self.onMessageReceived)
self.signalsInterface.registerListener("receipt_messageSent", self.onMessageSent)
self.signalsInterface.registerListener("presence_updated", self.onPresenceUpdated)
self.signalsInterface.registerListener("disconnected", self.onDisconnected)
self.signalsInterface.registerListener("sync_contactsReceived", self.onSyncContacts)
self.signalsInterface.registerListener("sync_statusesReceived", self.onSyncStatuses)
self.commandMappings = {"lastseen":lambda: self.methodsInterface.call("presence_request", ( self.jid,)),
"available": lambda: self.methodsInterface.call("presence_sendAvailable"),
"unavailable": lambda: self.methodsInterface.call("presence_sendUnavailable"),
"sync": lambda number: self.methodsInterface.call("sync_sendContacts", ([number],)),
"status": lambda cjid: self.methodsInterface.call("sync_getStatuses", ([cjid],))
}
self.done = False
示例5: __init__
# 需要导入模块: from Yowsup.connectionmanager import YowsupConnectionManager [as 别名]
# 或者: from Yowsup.connectionmanager.YowsupConnectionManager import getMethodsInterface [as 别名]
def __init__(self, user, password, phone):
"""WhatsAppClient's constructor.
Args:
user (str): the local phone number.
password (str): the WhatsApp password of 'user'.
phone (str): the remote phone number.
"""
super().__init__()
self.user = user
try:
self.password = base64.b64decode(bytes(password.encode("utf-8")))
except base64.binascii.Error: # Lets Yowsup handle the error.
self.password = bytes(password.encode("utf-8"))
# Users are identified in WhatsApp by their phone number (plus the
# code) followed by the domain '@s.whatsapp.net'.
self.phone = phone + "@s.whatsapp.net"
self.connected = False
# Yowsup managers and signals setting up.
connectionManager = YowsupConnectionManager()
connectionManager.setAutoPong(True)
self.signalsInterface = connectionManager.getSignalsInterface()
self.methodsInterface = connectionManager.getMethodsInterface()
self.signalsInterface.registerListener("auth_success", self.onAuthSuccess)
self.signalsInterface.registerListener("auth_fail", self.onAuthFailed)
self.signalsInterface.registerListener("message_received", self.onMessageReceived)
self.signalsInterface.registerListener("image_received", self.onImageReceived)
self.signalsInterface.registerListener("disconnected", self.onDisconnected)
示例6: __init__
# 需要导入模块: from Yowsup.connectionmanager import YowsupConnectionManager [as 别名]
# 或者: from Yowsup.connectionmanager.YowsupConnectionManager import getMethodsInterface [as 别名]
def __init__(self, phoneNumber, keepAlive = False, sendReceipts = False):
self.sendReceipts = sendReceipts
self.phoneNumber = phoneNumber
self.jid = "%[email protected]" % phoneNumber
self.sentCache = {}
connectionManager = YowsupConnectionManager()
connectionManager.setAutoPong(keepAlive)
self.signalsInterface = connectionManager.getSignalsInterface()
self.methodsInterface = connectionManager.getMethodsInterface()
self.signalsInterface.registerListener("auth_success", self.onAuthSuccess)
self.signalsInterface.registerListener("auth_fail", self.onAuthFailed)
self.signalsInterface.registerListener("message_received", self.onMessageReceived)
self.signalsInterface.registerListener("receipt_messageSent", self.onMessageSent)
self.signalsInterface.registerListener("presence_updated", self.onPresenceUpdated)
self.signalsInterface.registerListener("disconnected", self.onDisconnected)
self.commandMappings = {"lastseen":lambda: self.methodsInterface.call("presence_request", ( self.jid,)),
"available": lambda: self.methodsInterface.call("presence_sendAvailable"),
"unavailable": lambda: self.methodsInterface.call("presence_sendUnavailable"),
"crypt": None,
"close": None
}
self.done = False
#signalsInterface.registerListener("receipt_messageDelivered", lambda jid, messageId: methodsInterface.call("delivered_ack", (jid, messageId)))
#for encrypted communication
self.decrRcvMsgKey = myRsa().create() #generate my rsa keys
self.encrSendMsgKey = None
self.encrProtocolStatus = 0 # 1: request made, 2:request arrived, 3: com. is encrypted
示例7: LibInterfaceHandler
# 需要导入模块: from Yowsup.connectionmanager import YowsupConnectionManager [as 别名]
# 或者: from Yowsup.connectionmanager.YowsupConnectionManager import getMethodsInterface [as 别名]
class LibInterfaceHandler(InterfaceHandlerBase):
def __init__(self, username):
self.connectionManager = YowsupConnectionManager()
self.connectionManager.setAutoPong(True)
self.signalInterface = self.connectionManager.getSignalsInterface()
self.methodInterface = self.connectionManager.getMethodsInterface()
super(LibInterfaceHandler,self).__init__();
self.initSignals()
self.initMethods()
def initSignals(self):
self.signals = self.signalInterface.getSignals()
def initMethods(self):
#get methods
self.methods = self.methodInterface.getMethods()
def connectToSignal(self, signalName, callback):
if not self.isSignal(signalName):
raise InvalidSignalException()
self.signalInterface.registerListener(signalName, callback)
def call(self, methodName, params = ()):
if not self.isMethod(methodName):
raise InvalidMethodException()
return self.methodInterface.call(methodName, params)
示例8: __init__
# 需要导入模块: from Yowsup.connectionmanager import YowsupConnectionManager [as 别名]
# 或者: from Yowsup.connectionmanager.YowsupConnectionManager import getMethodsInterface [as 别名]
def __init__(self, keepAlive = True, sendReceipts = True):
self.sendReceipts = sendReceipts
connectionManager = YowsupConnectionManager()
connectionManager.setAutoPong(keepAlive)
self.signalsInterface = connectionManager.getSignalsInterface()
self.methodsInterface = connectionManager.getMethodsInterface()
self.signalsInterface.registerListener("message_received", self.onMessageReceived)
self.signalsInterface.registerListener("auth_success", self.onAuthSuccess)
self.signalsInterface.registerListener("auth_fail", self.onAuthFailed)
self.signalsInterface.registerListener("disconnected", self.onDisconnected)
self.signalsInterface.registerListener("message_error", self.onError)
self.signalsInterface.registerListener("receipt_messageSent", self.onMessageSent)
self.signalsInterface.registerListener("receipt_messageDelivered", self.onMessageDelivered)
self.signalsInterface.registerListener("image_received", self.onImageReceived)
self.cm = connectionManager
self.message_queue = Queue()
self.image_queue = Queue()
self.reply_dic = {}
self.running = True
示例9: __init__
# 需要导入模块: from Yowsup.connectionmanager import YowsupConnectionManager [as 别名]
# 或者: from Yowsup.connectionmanager.YowsupConnectionManager import getMethodsInterface [as 别名]
def __init__(self, sendReceipts = True, timeout = 5):
""" __init__"""
self.timeout = timeout
self.done = False
self.path = ""
self.gotMediaReceipt = False
connectionManager = YowsupConnectionManager()
connectionManager.setAutoPong(True)
self.signalsInterface = connectionManager.getSignalsInterface()
self.methodsInterface = connectionManager.getMethodsInterface()
self.signalsInterface.registerListener("auth_success", self.onAuthSuccess)
self.signalsInterface.registerListener("auth_fail", self.onAuthFailed)
self.signalsInterface.registerListener("disconnected", self.onDisconnected)
# self.signalsInterface.registerListener("profile_setPictureSuccess", self.onSetPictureSuccess)
# self.signalsInterface.registerListener("profile_setPictureError", self.onSetPictureError)
# self.signalsInterface.registerListener("profile_setStatusSuccess", self.onSetStatusSuccess)
# self.signalsInterface.registerListener("presence_updated", self.onPresenceUpdated)
# self.signalsInterface.registerListener("presence_available", self.onPresenceAvailable)
# self.signalsInterface.registerListener("presence_unavailable", self.onPresenceUnavailable)
self.signalsInterface.registerListener("media_uploadRequestSuccess", self.onMediaUploadRequestSuccess)
self.signalsInterface.registerListener("media_uploadRequestFailed", self.onMediaUploadRequestFailure)
self.signalsInterface.registerListener("media_uploadRequestDuplicate", self.onMediaUploadRequestDuplicate)
示例10: __init__
# 需要导入模块: from Yowsup.connectionmanager import YowsupConnectionManager [as 别名]
# 或者: from Yowsup.connectionmanager.YowsupConnectionManager import getMethodsInterface [as 别名]
def __init__(self, keepAlive = False, sendReceipts = False):
self.sendReceipts = sendReceipts
self.redis=redis.Redis()
self.queue_key = 'MESSAGES_LISTS'
self.MODE_CONNECTED=1
self.MODE_DISCONNECTED=2
self.MODE_CONNECTING=3
connectionManager = YowsupConnectionManager()
connectionManager.setAutoPong(keepAlive)
self.signalsInterface = connectionManager.getSignalsInterface()
self.methodsInterface = connectionManager.getMethodsInterface()
self.signalsInterface.registerListener("message_received", self.onMessageReceived)
self.signalsInterface.registerListener("auth_success", self.onAuthSuccess)
self.signalsInterface.registerListener("auth_fail", self.onAuthFailed)
self.signalsInterface.registerListener("disconnected", self.onDisconnected)
self.signalsInterface.registerListener("receipt_messageSent", self.onMessageSent)
self.signalsInterface.registerListener("receipt_messageDelivered",self.messageReceived)
#self.signalsInterface.registerListener("receipt_messageDelivered", lambda jid, messageId: methodsInterface.call("delivered_ack", (jid, messageId)))
self.cm = connectionManager
示例11: __init__
# 需要导入模块: from Yowsup.connectionmanager import YowsupConnectionManager [as 别名]
# 或者: from Yowsup.connectionmanager.YowsupConnectionManager import getMethodsInterface [as 别名]
def __init__(self, phoneNumber, keepAlive = False, sendReceipts = False):
self.sendReceipts = sendReceipts
self.phoneNumber = phoneNumber
self.jid = "%[email protected]" % phoneNumber
self.sentCache = {}
connectionManager = YowsupConnectionManager()
connectionManager.setAutoPong(keepAlive)
self.signalsInterface = connectionManager.getSignalsInterface()
self.methodsInterface = connectionManager.getMethodsInterface()
self.signalsInterface.registerListener("auth_success", self.onAuthSuccess)
self.signalsInterface.registerListener("auth_fail", self.onAuthFailed)
self.signalsInterface.registerListener("message_received", self.onMessageReceived)
self.signalsInterface.registerListener("receipt_messageSent", self.onMessageSent)
self.signalsInterface.registerListener("presence_updated", self.onPresenceUpdated)
self.signalsInterface.registerListener("disconnected", self.onDisconnected)
self.commandMappings = {"lastseen":lambda: self.methodsInterface.call("presence_request", ( self.jid,)),
"available": lambda: self.methodsInterface.call("presence_sendAvailable"),
"unavailable": lambda: self.methodsInterface.call("presence_sendUnavailable")
}
self.done = False
示例12: inicia_whatsapp
# 需要导入模块: from Yowsup.connectionmanager import YowsupConnectionManager [as 别名]
# 或者: from Yowsup.connectionmanager.YowsupConnectionManager import getMethodsInterface [as 别名]
def inicia_whatsapp():
#Se hacen publicas las variables de la conexion
global y
global signalsInterface
global methodsInterface
global contador
global vaciado_mensajes_offline
y = YowsupConnectionManager()
y.setAutoPong(True) #Responder a los ping que hagan
signalsInterface = y.getSignalsInterface() #Se recibiran las senales
methodsInterface = y.getMethodsInterface() #Se utilizaran los metodos
signalsInterface.registerListener("message_received", onMessageReceived)
signalsInterface.registerListener("receipt_messageSent", onMessageSent)
signalsInterface.registerListener("receipt_messageDelivered", onMessageDelivered)
signalsInterface.registerListener("auth_success", onAuthSuccess)
signalsInterface.registerListener("ping", onPing)
signalsInterface.registerListener("disconnected", onDisconnected)
methodsInterface.call("auth_login", (username, password))
methodsInterface.call("ready")
#Leer todos los mensajes offline y no analizarlos
contador = 0
vaciado_mensajes_offline = False
while (contador<10): #Contador se pondra a cero cada vez que salta la interrupcion de un mensaje
contador += 1
time.sleep(0.1)
#Cuando sale del while ha pasado 1 segundo sin recibir mensajes
vaciado_mensajes_offline = True
#Aqui ponemos nuestro numero de movil principal para que abrá una conversación como que la pi está operativa
methodsInterface.call("message_send", ("[email protected]", 'Reset'))
示例13: __init__
# 需要导入模块: from Yowsup.connectionmanager import YowsupConnectionManager [as 别名]
# 或者: from Yowsup.connectionmanager.YowsupConnectionManager import getMethodsInterface [as 别名]
def __init__(self, config, keepAlive=False, sendReceipts=False, dryRun=False):
self.sendReceipts = sendReceipts
self.dryRun = dryRun
self.config = config
# Initialize
connectionManager = YowsupConnectionManager()
connectionManager.setAutoPong(keepAlive)
self.signalsInterface = connectionManager.getSignalsInterface()
self.methodsInterface = connectionManager.getMethodsInterface()
# Configure the listeners
self.signalsInterface.registerListener("auth_success", self.onAuthSuccess)
self.signalsInterface.registerListener("auth_fail", self.onAuthFailed)
self.signalsInterface.registerListener("disconnected", self.onDisconnected)
self.signalsInterface.registerListener("message_received", self.onMessageReceived)
self.signalsInterface.registerListener("presence_updated", self.onPresenceUpdated)
self.signalsInterface.registerListener("presence_available", self.onPresenceAvailable)
self.signalsInterface.registerListener("presence_unavailable", self.onPresenceUnavailable)
# Create a queue so we can stash the incoming data somewhere
self.events = Queue.PriorityQueue()
# Dictionary of contacts with their names
self.names = dict(config['jids'])
self.contacts = [jid for jid, name in config['jids']]
# A count of events for each interval for each contact
self.tally = defaultdict(lambda: dict((jid, 0) for jid in self.contacts))
self.printer = None
self.connected = False
self.lastline, self.nextline = findInterval(LINE_INTERVAL)
self.nth = 0
示例14: __init__
# 需要导入模块: from Yowsup.connectionmanager import YowsupConnectionManager [as 别名]
# 或者: from Yowsup.connectionmanager.YowsupConnectionManager import getMethodsInterface [as 别名]
def __init__(self, app, keepAlive = False, sendReceipts = False):
self.sendReceipts = sendReceipts
self.app = app
connectionManager = YowsupConnectionManager()
connectionManager.setAutoPong(keepAlive)
self.signalsInterface = connectionManager.getSignalsInterface()
self.methodsInterface = connectionManager.getMethodsInterface()
self.signalsInterface.registerListener("message_received", self.onMessageReceived)
self.signalsInterface.registerListener("group_messageReceived", self.onGroupMessageReceived)
self.signalsInterface.registerListener("image_received", self.onImageReceived)
self.signalsInterface.registerListener("auth_success", self.onAuthSuccess)
self.signalsInterface.registerListener("auth_fail", self.onAuthFailed)
self.signalsInterface.registerListener("disconnected", self.onDisconnected)
self.signalsInterface.registerListener("contact_gotProfilePicture", self.onGotProfilePicture)
self.signalsInterface.registerListener("profile_setStatusSuccess", self.onSetStatusSuccess)
self.signalsInterface.registerListener("group_createSuccess", self.onGroupCreateSuccess)
self.signalsInterface.registerListener("group_createFail", self.onGroupCreateFail)
self.signalsInterface.registerListener("group_gotInfo", self.onGroupGotInfo)
self.signalsInterface.registerListener("group_addParticipantsSuccess", self.onGroupAddParticipantsSuccess)
self.cm = connectionManager
self.url = os.getenv('SERVER_URL', 'http://localhost:3000')
self.post_headers = {'Content-type': 'application/json', 'Accept': 'application/json'}
self.done = False
示例15: __init__
# 需要导入模块: from Yowsup.connectionmanager import YowsupConnectionManager [as 别名]
# 或者: from Yowsup.connectionmanager.YowsupConnectionManager import getMethodsInterface [as 别名]
def __init__(self, login, password):
connectionManager = YowsupConnectionManager()
self.signals = connectionManager.getSignalsInterface()
self.methods = connectionManager.getMethodsInterface()
self.signals.registerListener("auth_success", self.onAuthSuccess)
self.signals.registerListener("auth_fail", self.onAuthFailed)
self.login = login
self.password = base64.b64decode(bytes(password.encode('utf-8')))
self.done = False