This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests as r | |
def get_ngrok_url(protocol: str, url_with_protocol=True): | |
if protocol not in ("https", "http"): | |
raise ValueError("protocol param must be in ('https', 'http')") | |
suffix = "" if protocol == "https" else " (http)" | |
uri = f"http://localhost:4040/api/tunnels/command_line{suffix}" | |
try: | |
response = r.get(uri) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import telegram | |
from telegram.ext import Updater, CallbackQueryHandler, MessageHandler, Filters, ConversationHandler, PrefixHandler | |
import logging | |
logging.basicConfig( | |
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', | |
level=logging.DEBUG | |
) | |
TOKEN = "" | |
MAIN = "MAIN" |