linkedin2/utils/telega.py

26 lines
611 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import requests
from dotenv import load_dotenv
import os
load_dotenv()
api_key = os.getenv('TGAPI_KEY')
chat = os.getenv('TGCHAT_ID')
# text = '=> Народ 🥺 упал обмен с контактами не забудь поднять'
text1 = ' => Упс 🆘 <ins><b>TECT </b></ins> ! 🥺"'
# erro(text1=' => Упс 🆘 <ins><b>TECT </b></ins> ! 🥺')
def erro(text1):
a = requests.get('https://api.telegram.org/bot{}/sendMessage'.format(api_key), params=dict(
chat_id=chat,
text= str(text1),
parse_mode='HTML'))
# if __name__ == '__main__':
# erro(text1)