#получаешь сессию
async def main():
client = TelegramClient('session', api_id, api_hash)
assert await client.connect()
if not client.is_user_authorized():
await client.send_code_request(phone_number)
me = await client.sign_in(phone_number, input('Enter code: '))
#Затем заходишь по ней
async def main():
client = TelegramClient('session', api_id, api_hash)
await client.start()
await client.send_message(entity='channel_name', message="Текст")
from selenium import webdriver
from seleniumwire import webdriver
from webdriver_manager.chrome import ChromeDriverManager
username = ''
password = ''
ip = ''
port = ''
proxy = f'{username}:{password}@{ip}:{port}'
options = {
'proxy': {
'https': f'https://{proxy}',
}
}
driver = webdriver.Chrome(ChromeDriverManager().install(),seleniumwire_options=options)
driver.get('https://2ip.ru/')
with open
.