Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to use mtproto proxy for telethon

from telethon import TelegramClient, connection
#   we need to change the connection ^^^^^^^^^^

client = TelegramClient(
    'anon',
    api_id,
    api_hash,

    # Use one of the available connection modes.
    # Normally, this one works with most proxies.
    connection=connection.ConnectionTcpMTProxyRandomizedIntermediate,

    # Then, pass the proxy details as a tuple:
    #     (host name, port, proxy secret)
    #
    # If the proxy has no secret, the secret must be:
    #     '00000000000000000000000000000000'
    proxy=('mtproxy.example.com', 2002, 'secret')
)
Comment

PREVIOUS NEXT
Code Example
Python :: how to specify a key to be as a break fomction python 
Python :: change index function for class python 
Python :: unable to import flask pylint 
Python :: how to pick the latest data entered django 
Python :: python all option 
Python :: python export 16 bit tiff 
Python :: how to send image to template thats not in static flask 
Python :: python create zip file 
Python :: python indian currency formatter 
Python :: Converting a HDFDataset to numpy array 
Python :: python comment header 
Python :: get object by name blender python 
Python :: pandas csv sum column 
Python :: calculate the R^2 for X and Y python 
Python :: How to plot Feature importance of any model in python 
Python :: python "urllib3" download and save pdf 
Python :: how to stop python for some time in python 
Python :: numpy random entries not repeat 
Python :: most occurring element in array python 
Python :: python odd or even 
Python :: check if a string is palindrome or not using two pointer function in python 
Python :: 0x80370102 kali linux 
Python :: keras sequential layer without input shape 
Python :: Roberta Inference TensorFlow 
Python :: ipywidgets label text color 
Python :: pydub audiosegment to numpy array 
Python :: plot multiple columns in different colors plotly 
Python :: pathlib check is file 
Python :: search mean in python using pandas 
Python :: django q example 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =