Python script for sending messages to Telegram users
bot_key (the key to the bot telegram)
Message (the message that will be sent)
stream_count (the number of streams)
silent (1 or 0, request parameter)
The second txt file with the user's ID base to whom you need to send a message.100k + lines.Bases in the form:
93278647
938292198
4763845
4238992384
The...
The third txt file is empty, in which the result will be written.The fourth file is the script itself, which must work according to the principle:
1 .Take all the data from the first file
The 2ndTake the first stream_count users from the second file
3 .Due to the multi-direction to simultaneously send all users from point 2 message ( simultaneously pull the urls that is built on this principle: https://api.telegram.org/bot{bot_key}/sendMessage?chat_id={user_id}&text={message}&disable_notification={silent} )
and 4.Record the result for each of the users in the third file (and take it to the console) in the form of user_id:{tibhf} (When requested as in the example in p.3 telegram returns json answer (response), and if response['ok'] == true means the message successfully sent).Examples that should be written in the third file:
93278647:t
938292198:t
4763845:f
4238992384:t
The...
and 5.Remove from the second file the first stream_count lines (users to whom the message was sent)
6 .Repeat paragraphs 2-5 until the second file has records.
Additionally :
Processing of errors.When receiving the status of 429 from Telegram, the script must bring a message to the console about it to reduce the number of streams (stream_count) and stop.The task is relevant for 1-2 days, in the application indicate the deadlines and price.
Client's review of cooperation with Oleksandr Furgalyuk
Python script for sending messages to Telegram usersIncredibly quick performance of the task, perfectly working code on the TZ. It is 10/10.
Freelancer's review of cooperation with And Rew
Python script for sending messages to Telegram usersA big plus for a clear TZ. The project was quickly closed. I recommend cooperation.
-
127 Good day !
Ready to begin the implementation of the project, to discuss the details - write to LS)
-
115 I do for 1.5k, I know how to do everything, sending almost not every day, there are a lot of projects, I will do in a day, + on contact 24/7
-
434 9 0 Good day . I can make for you such a Python script with the function you described.
Current freelance projects in the category Python
Data parsing through mobile APILooking for a person with experience in data parsing through mobile API, for parsing e-commerce, rozetka and similar sites. Tasks: 1. Intercepting traffic from the mobile application (Android), setting up a proxy, analyzing requests. 2. Identifying the necessary API endpoints… Python, Data Parsing ∙ 1 day 3 hours back ∙ 24 proposals |
Find a product feed (Google Merchant XML) for a website on OpenCart
16 USD
It is necessary to find a direct link to the active product feed (XML) of a competitor for Google Merchant Center Platform (CMS): OpenCart / ocStore Find the original feedRequirements for the result: Working link to the XML file Python, Data Parsing ∙ 6 days 12 hours back ∙ 28 proposals |
Development of a TikTok farm (content factory)It is necessary to develop a system for centralized management of multiple TikTok accounts with automatic content publishing, using individual proxies and simulating natural account activity. Functional Requirements1. Account Management Adding and removing TikTok accounts.… Python, Bot Development ∙ 6 days 23 hours back ∙ 22 proposals |
Improve the performance of Claude Code and work on software development.I am currently developing CRM and Analytics software. I am using Claude Code, but I understand that the results are not the best in terms of changes. There are 2 tasks - Need help creating a preset for skills, MD, and so on to improve quality. Take verified ones that have been… AI & Machine Learning, Python ∙ 7 days 6 hours back ∙ 28 proposals |
OCR systemA system for recognizing text on postal envelopes (index for whom - only numbers). The text can sometimes be handwritten. Recognition of stamps (counting quantity and denomination) Python ∙ 7 days 9 hours back ∙ 28 proposals |