30mb1 / telegram-mailer Goto Github PK
View Code? Open in Web Editor NEWWeb-application for sending messages to list of users. Use several accounts to avoid ban.
Web-application for sending messages to list of users. Use several accounts to avoid ban.
I did not quite understand the moment with the creation of the config, so I decided to leave it by default. There you wrote server_name some_domain.com but showed it on a local host. It is also unclear how to indicate the path to my application and the path to the logs.
root / path / to / your_app;
access_log /path/to/your_app/logs/access.log;
error_log /path/to/your_app/logs/error.log;
I do receive the code after a longer wait, but when I click activate I get server error with the below output on the console.
DEBUG:telethon.network.mtproto_sender:Read RPC error: (PhoneMigrateError(...), 'The phone number a user is trying to use for authorization is associated with DC 1.')
DEBUG:telethon.telegram_bare_client:DC error when invoking request, attempting to reconnect at DC 1
Exception in thread ReadThread:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_client.py", line 951, in _recv_thread_impl
self._sender.receive(update_state=self.updates)
AttributeError: 'NoneType' object has no attribute 'receive'
DEBUG:telethon.network.mtproto_sender:Handling bad server salt
DEBUG:telethon.network.mtproto_sender:Processing TLObject new_session_created#9ec20908 first_msg_id:long unique_id:long server_salt:long = NewSession
DEBUG:telethon.network.mtproto_sender:Handling RPC result
DEBUG:telethon.network.mtproto_sender:Reading request response
DEBUG:telethon.network.mtproto_sender:Handling RPC result
DEBUG:telethon.network.mtproto_sender:Read RPC error: (PhoneMigrateError(...), 'The phone number a user is trying to use for authorization is associated with DC 1.')
DEBUG:telethon.telegram_bare_client:DC error when invoking request, attempting to reconnect at DC 1
Exception in thread ReadThread:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_client.py", line 951, in _recv_thread_impl
self._sender.receive(update_state=self.updates)
AttributeError: 'NoneType' object has no attribute 'receive'
DEBUG:telethon.network.mtproto_sender:Handling bad server salt
DEBUG:telethon.network.mtproto_sender:Processing TLObject new_session_created#9ec20908 first_msg_id:long unique_id:long server_salt:long = NewSession
DEBUG:telethon.network.mtproto_sender:Handling RPC result
DEBUG:telethon.network.mtproto_sender:Reading request response
DEBUG:telethon.network.mtproto_sender:Handling RPC result
DEBUG:telethon.network.mtproto_sender:Read RPC error: (PhoneMigrateError(...), 'The phone number a user is trying to use for authorization is associated with DC 4.')
DEBUG:telethon.telegram_bare_client:DC error when invoking request, attempting to reconnect at DC 4
Exception in thread ReadThread:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_client.py", line 951, in _recv_thread_impl
self._sender.receive(update_state=self.updates)
AttributeError: 'NoneType' object has no attribute 'receive'
DEBUG:telethon.network.mtproto_sender:Handling bad server salt
DEBUG:telethon.network.mtproto_sender:Processing TLObject new_session_created#9ec20908 first_msg_id:long unique_id:long server_salt:long = NewSession
DEBUG:telethon.network.mtproto_sender:Handling RPC result
DEBUG:telethon.network.mtproto_sender:Reading request response
DEBUG:telethon.network.mtproto_sender:Handling RPC result
DEBUG:telethon.network.mtproto_sender:Reading request response
DEBUG:telethon.network.mtproto_sender:Read RPC error: (FloodWaitError(...), 'A wait of 82771 seconds is required.')
Exception in thread Thread-2:
Traceback (most recent call last):
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_client.py", line 238, in invoke
request, call_receive=self._recv_thread is None
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_bare_client.py", line 318, in invoke
raise request.rpc_error
telethon.errors.rpc_errors_303.PhoneMigrateError: (PhoneMigrateError(...), 'The phone number a user is trying to use for authorization is associated with DC 1.')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/home/chwba/git/Telegram-mailer/utils.py", line 15, in make_request
clients_list[phone].send_code_request(phone)
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_client.py", line 281, in send_code_request
SendCodeRequest(phone, self.api_id, self.api_hash))
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_client.py", line 247, in invoke
return self.invoke(request)
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_client.py", line 238, in invoke
request, call_receive=self._recv_thread is None
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_bare_client.py", line 318, in invoke
raise request.rpc_error
telethon.errors.rpc_errors_420.FloodWaitError: (FloodWaitError(...), 'A wait of 82771 seconds is required.')
Exception in thread ReadThread:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_client.py", line 947, in _recv_thread_impl
int.from_bytes(os.urandom(8), 'big', signed=True)
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/network/mtproto_sender.py", line 63, in send
self._send_packet(writer.get_bytes(), request)
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/network/mtproto_sender.py", line 129, in _send_packet
self.connection.send(cipher_writer.get_bytes())
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/network/connection.py", line 173, in _send_tcp_full
self.write(writer.get_bytes())
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/network/connection.py", line 215, in _write_plain
self.conn.write(data)
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/extensions/tcp_client.py", line 66, in write
self._socket.sendall(data)
BrokenPipeError: [Errno 32] Broken pipe
DEBUG:telethon.network.mtproto_sender:Read RPC error: (FloodWaitError(...), 'A wait of 82746 seconds is required.')
Exception in thread Thread-2:
Traceback (most recent call last):
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_client.py", line 238, in invoke
request, call_receive=self._recv_thread is None
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_bare_client.py", line 318, in invoke
raise request.rpc_error
telethon.errors.rpc_errors_303.PhoneMigrateError: (PhoneMigrateError(...), 'The phone number a user is trying to use for authorization is associated with DC 1.')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/home/chwba/git/Telegram-mailer/utils.py", line 15, in make_request
clients_list[phone].send_code_request(phone)
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_client.py", line 281, in send_code_request
SendCodeRequest(phone, self.api_id, self.api_hash))
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_client.py", line 247, in invoke
return self.invoke(request)
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_client.py", line 238, in invoke
request, call_receive=self._recv_thread is None
File "/home/chwba/git/Telegram-mailer/venv/lib/python3.7/site-packages/telethon/telegram_bare_client.py", line 318, in invoke
raise request.rpc_error
telethon.errors.rpc_errors_420.FloodWaitError: (FloodWaitError(...), 'A wait of 82746 seconds is required.')
Привет. При попытки верифицировать аккаунт, на сервере 500 ошибка, и вот такой лог
[2022-04-07 04:16:13,203] ERROR in app: Exception on /account [POST]
Traceback (most recent call last):
File "/var/www/bot/Telegram-mailer/venv/lib/python3.8/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/var/www/bot/Telegram-mailer/venv/lib/python3.8/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/var/www/bot/Telegram-mailer/venv/lib/python3.8/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/var/www/bot/Telegram-mailer/venv/lib/python3.8/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/var/www/bot/Telegram-mailer/venv/lib/python3.8/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/var/www/bot/Telegram-mailer/venv/lib/python3.8/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/var/www/bot/Telegram-mailer/app/views.py", line 136, in account
client.disconnect()
AttributeError: 'NoneType' object has no attribute 'disconnect'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.