Files
fesmoo_perdoliq/baraban.py

43 lines
977 B
Python
Raw Normal View History

2018-05-11 20:46:37 +02:00
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Simple Bot to reply to Telegram messages.
This is built on the API wrapper, see echobot2.py to see the same example built
on the telegram.ext bot framework.
This program is dedicated to the public domain under the CC0 license.
"""
import os
2018-09-26 18:24:55 +03:00
import sys
2018-05-11 20:46:37 +02:00
import logging
2018-05-17 16:33:53 +00:00
import threading
2018-05-11 20:46:37 +02:00
from time import sleep
2019-12-06 12:23:21 +03:00
from main import Perdoliq
2018-05-11 20:46:37 +02:00
def main():
2019-12-06 12:23:21 +03:00
list_test('4016014', '40403')
2018-05-11 20:46:37 +02:00
2018-05-11 23:08:29 +03:00
def perdoliq(username, password, subj, test, acc, is_delayed):
2018-05-11 21:50:45 +02:00
try:
app = Perdoliq(username, password)
app.auth()
app.resolve(subj, test, acc, is_delayed=int(is_delayed))
2018-05-11 21:50:45 +02:00
except Exception as e:
2018-05-11 23:08:29 +03:00
return "Exception: " + str(e)
def list_test(username, password):
try:
app = Perdoliq(username, password)
app.auth()
return (app.get_tests())
except Exception as e:
return "Exception: " + str(e)
2018-05-11 21:50:45 +02:00
2018-05-11 20:46:37 +02:00
if __name__ == '__main__':
try:
main()
except:
pass