{"id":466528,"date":"2025-07-09T03:00:06","date_gmt":"2025-07-09T03:00:06","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=466528"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=466528","title":{"rendered":"<span>\u041a\u0430\u043a \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 Telegram \u0432 \u0441\u0442\u0430\u0442\u0443\u0441 Steam<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u0445 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e. \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043d\u0435\u0439 \u043d\u0430\u0437\u0430\u0434 \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044e &#171;<a href=\"https:\/\/habr.com\/ru\/articles\/457078\/\" rel=\"noopener noreferrer nofollow\">\u041a\u0430\u043a \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u0430\u0432\u0430\u0442\u0430\u0440\u043a\u0443 \u0432 Telegram \u0432 \u0447\u0430\u0441\u044b<\/a>&#171;. \u042f \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0441\u0430\u043c, \u043d\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u043f\u0430\u043c\u0435\u0440\u043e\u0432 \u0432 \u0447\u0430\u0442\u0430\u0445. \u0410 \u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e, \u0442\u043e \u043c\u043d\u0435 \u0432\u044b\u0434\u0430\u0432\u0430\u043b\u0438 \u0444\u043b\u0443\u0434-\u0431\u0430\u043d \u0438 \u044f \u043d\u0435 \u043c\u043e\u0433 \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0432\u043e\u044e \u0430\u0432\u0430\u0442\u0430\u0440\u043a\u0443 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0439 21 \u0447\u0430\u0441.<\/p>\n<p>\u042f \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u043a\u0443\u0447\u0443 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u0438\u0431\u043e \u0437\u0430\u0434\u0443\u043c\u043a\u0430 \u043c\u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c. \u041d\u043e \u043d\u0438\u043a\u0430\u043a\u0438\u0435 \u0442\u0430\u0439\u043c\u0438\u043d\u0433\u0438 \u043d\u0435 \u043c\u043e\u0433\u043b\u0438 \u0441\u043f\u0430\u0441\u0442\u0438 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u0432\u044b\u043a\u0430\u0442\u0438\u0442\u044c \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0438\u0437 \u0442\u043e\u043b\u043f\u044b, \u0445\u043e\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u043e\u043d \u0438 \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u0435\u0435 \u0437\u0430\u043c\u0435\u0442\u043d\u044b\u0439.<\/p>\n<h2>\u0417\u0430\u0434\u0443\u043c\u043a\u0430<\/h2>\n<p>\u0417\u0430\u0434\u0443\u043c\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u043c\u043e\u0435\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 Steam. \u041f\u0440\u0438 \u0441\u043c\u0435\u043d\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u0430, \u0431\u0443\u0434\u044c \u0442\u043e \u0432 \u0438\u0433\u0440\u0435, \u0431\u0443\u0434\u044c \u0442\u043e \u043d\u0435 \u0432 \u0441\u0435\u0442\u0438, \u043c\u043e\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0432 Telegram \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u0435\u043d \u0441\u0435\u0440\u0432\u0430\u043a \u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u043d\u0430\u043d\u0438\u044f<\/p>\n<h2>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<p>\u0411\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Python, \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Steam \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u0430 \u0434\u043b\u044f Telegram \u0441\u0442\u0430\u0440\u044b\u0439 \u0434\u043e\u0431\u0440\u044b\u0439 <a href=\"https:\/\/pypi.org\/project\/Telethon\/\" rel=\"noopener noreferrer nofollow\">telethon<\/a>.<\/p>\n<pre><code>pip install Telethon pip install steam<\/code><\/pre>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u043c\u043e\u0434\u0443\u043b\u0438<\/p>\n<pre><code class=\"python\">from telethon import TelegramClient, sync import time import steam.webapi from steam.steamid import SteamID from telethon import TelegramClient, events from telethon.tl.functions.account import UpdateProfileRequest<\/code><\/pre>\n<p>\u041f\u043e\u0442\u043e\u043c \u043f\u043e\u044f\u0441\u043d\u044e, \u0447\u0442\u043e \u043a\u0443\u0434\u0430 \u0438 \u0433\u0434\u0435 \ud83d\ude00<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u0437\u0430\u0434\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f<\/p>\n<pre><code class=\"python\">API_KEY = '' # \u0412\u0430\u0448 API \u043a\u043b\u044e\u0447 Steam (\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0434\u0435\u0441\u044c: https:\/\/steamcommunity.com\/dev\/apikey) profile_url = \"https:\/\/bit.ly\/steam_com\"  # steam \u043f\u0440\u043e\u0444\u0438\u043b\u044c max_symvols = 70 # \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u0435 :D steam_id = 123456  # steam id client = TelegramClient(\"anon\", api_id, \"api_hash\") client.start() steam_api = steam.webapi.WebAPI(API_KEY)<\/code><\/pre>\n<p><strong> API_KEY<\/strong> &#8212; \u0412\u0430\u0448 API \u043a\u043b\u044e\u0447 Steam (\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/steamcommunity.com\/dev\/apikey\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>).<br \/> <strong>profile_url<\/strong> &#8212; \u0412\u0430\u0448 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0432 Steam. \u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435\u043b\u044c\u0437\u044f \u0432\u0437\u044f\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0438\u0437 \u0430\u043f\u0438\u0448\u043a\u0438? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0435\u0433\u043e \u043f\u043e-\u0445\u043e\u0440\u043e\u0448\u0435\u043c\u0443 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u043b\u043a\u0443 \u0441\u0441\u044b\u043b\u043a\u0443. \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b<a href=\"https:\/\/app.bitly.com\/\" rel=\"noopener noreferrer nofollow\"> bitly<\/a>.<br \/> <strong>max_symvols<\/strong> &#8212; \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 Telegram. \u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0438 \u043e\u0442\u0434\u0435\u043b\u0438\u043b \u0435\u0433\u043e \u043e\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<br \/> <strong>steam_id<\/strong> &#8212; \u0412\u0430\u0448 id \u0432 steam.<br \/><strong> client<\/strong> &#8212; \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430 telethon. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0437\u044f\u0442\u044c api_id \u0438 api_hash <a href=\"https:\/\/my.telegram.org\/auth\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>. <\/p>\n<p>\u0422\u0430\u043a. \u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u0441\u043c\u0435\u043d\u044b \u0431\u0438\u043e<\/p>\n<pre><code class=\"python\">def change_bio(BIO_TEXT):     try:         client(UpdateProfileRequest(about=BIO_TEXT))         return f\"\u0411\u0438\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043e \u043d\u0430: {BIO_TEXT}\"     except Exception as e:         return f\"\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0431\u0438\u043e: {e}\"<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u0435\u0440\u043d\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0438\u043e. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043d\u0435\u0447\u0435\u0433\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c.<\/p>\n<p>\u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0443\u0441\u0430 Steam<\/p>\n<pre><code class=\"python\">def get_account_status(steam_id):     try:         steamid64 = SteamID(steam_id).as_64                  response = steam_api.call('ISteamUser.GetPlayerSummaries', steamids=steamid64, format='json')                  if not response['response']['players']:             return {\"error\": \"\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\"}                      player = response['response']['players'][0]          profile_url = player[\"profileurl\"]         if 'gameextrainfo' in player:             status = f\"\u0432 \u0438\u0433\u0440\u0435: {player['gameextrainfo']}\"         elif player['personastate'] == 1:             status = \"\u0432 \u0441\u0435\u0442\u0438\"         elif player['personastate'] == 2:             status = \"\u0437\u0430\u043d\u044f\u0442\"         elif player['personastate'] == 3:             status = \"\u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442\"         elif player['personastate'] == 4:             status = \": \u043d\u0435 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c\"         else:             status = \"\u043d\u0435 \u0432 \u0441\u0435\u0442\u0438\"                      return   [status, player[\"personaname\"]]     except Exception as e:         return {\"error\": str(e)}<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0443\u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0435. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0432 64-\u0431\u0438\u0442\u043d\u044b\u0439 SteamID, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0435 <code>response = steam_<\/code><a href=\"http:\/\/api.call\" rel=\"noopener noreferrer nofollow\"><code>api.call<\/code><\/a><code>('ISteamUser.GetPlayerSummaries', steamids=steamid64, format='json')<\/code><br \/>\u041d\u0443 \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0432\u0435\u0440\u044f\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432, \u0433\u0434\u0435 \u043d\u0430 \u043d\u0443\u043b\u0435\u0432\u043e\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0435 \u0441\u0442\u0430\u0442\u0443\u0441, \u0430 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c username \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043f\u0438\u0448\u0435\u043c  \u0444\u0443\u043d\u043a\u0446\u0438\u044e main<\/p>\n<pre><code class=\"python\">def main():     old_status = \"\"     while True:         profile = get_account_status(steam_id)         if old_status != profile[0]:             game_max = max_symvols - len(f\"\u0418\u0433\u0440\u043e\u043a {profile[1]}  | url: {profile_url}\") - 3             if len(profile[0]) &gt; game_max:                 gg = \"\"                 for x in range(game_max):                     gg  += list(profile[0])[x]                 profile[0] = gg + \"...\"             old_status = profile[0]             new_status = f\"\u0418\u0433\u0440\u043e\u043a {profile[1]} {profile[0]} | url: {profile_url}\"             result = change_bio(new_status)             print(result)         time.sleep(15)  <\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044b \u043a\u0430\u0436\u0434\u044b\u0435 15 \u0441\u0435\u043a\u0443\u043d\u0434 \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0443\u0441\u0430. \u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438\u0433\u0440\u044b, \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u043c.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">from telethon import TelegramClient, sync import time import steam.webapi from steam.steamid import SteamID from telethon import TelegramClient, events from telethon.tl.functions.account import UpdateProfileRequest  API_KEY = '' # \u0412\u0430\u0448 API \u043a\u043b\u044e\u0447 Steam (\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0434\u0435\u0441\u044c: https:\/\/steamcommunity.com\/dev\/apikey) profile_url = \"https:\/\/bit.ly\/steam_com\"  # steam \u043f\u0440\u043e\u0444\u0438\u043b\u044c max_symvols = 70 # \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u0435 :D steam_id = 123456  # steam id client = TelegramClient(\"anon\", api_id, \"api_hash\") client.start() steam_api = steam.webapi.WebAPI(API_KEY)  def change_bio(BIO_TEXT):     try:         client(UpdateProfileRequest(about=BIO_TEXT))         return f\"\u0411\u0438\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043e \u043d\u0430: {BIO_TEXT}\"     except Exception as e:         return f\"\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0431\u0438\u043e: {e}\" def get_account_status(steam_id):     try:         steamid64 = SteamID(steam_id).as_64                  response = steam_api.call('ISteamUser.GetPlayerSummaries', steamids=steamid64, format='json')                  if not response['response']['players']:             return {\"error\": \"\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\"}                      player = response['response']['players'][0]          profile_url = player[\"profileurl\"]         if 'gameextrainfo' in player:             status = f\"\u0432 \u0438\u0433\u0440\u0435: {player['gameextrainfo']}\"         elif player['personastate'] == 1:             status = \"\u0432 \u0441\u0435\u0442\u0438\"         elif player['personastate'] == 2:             status = \"\u0437\u0430\u043d\u044f\u0442\"         elif player['personastate'] == 3:             status = \"\u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442\"         elif player['personastate'] == 4:             status = \": \u043d\u0435 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c\"         else:             status = \"\u043d\u0435 \u0432 \u0441\u0435\u0442\u0438\"                      return   [status, player[\"personaname\"]]     except Exception as e:         return {\"error\": str(e)}  def main():     old_status = \"\"     while True:         profile = get_account_status(steam_id)         if old_status != profile[0]:             game_max = max_symvols - len(f\"\u0418\u0433\u0440\u043e\u043a {profile[1]}  | url: {profile_url}\") - 3             if len(profile[0]) &gt; game_max:                 gg = \"\"                 for x in range(game_max):                     gg  += list(profile[0])[x]                 profile[0] = gg + \"...\"             old_status = profile[0]             new_status = f\"\u0418\u0433\u0440\u043e\u043a {profile[1]} {profile[0]} | url: {profile_url}\"             result = change_bio(new_status)             print(result)         time.sleep(15)   if __name__ == \"__main__\":     main()<\/code><\/pre>\n<\/div>\n<\/details>\n<h2>\u0421\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435<\/h2>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3a4\/984\/0d8\/3a49840d8ec0c3e9224100ce220f5e0c.png\" alt=\"\u0421\u0442\u0430\u0442\u0443\u0441 &quot;\u0412 \u0441\u0435\u0442\u0438&quot;\" title=\"\u0421\u0442\u0430\u0442\u0443\u0441 &quot;\u0412 \u0441\u0435\u0442\u0438&quot;\" width=\"362\" height=\"76\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/3a4\/984\/0d8\/3a49840d8ec0c3e9224100ce220f5e0c.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3a4\/984\/0d8\/3a49840d8ec0c3e9224100ce220f5e0c.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421\u0442\u0430\u0442\u0443\u0441 &#171;\u0412 \u0441\u0435\u0442\u0438&#187;<\/figcaption><\/div>\n<\/figure>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9da\/866\/773\/9da86677330e9b8d784af487dd8aabb7.png\" alt=\"\u0421 \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u043a\u043e\u0439\" title=\"\u0421 \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u043a\u043e\u0439\" width=\"333\" height=\"83\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/9da\/866\/773\/9da86677330e9b8d784af487dd8aabb7.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9da\/866\/773\/9da86677330e9b8d784af487dd8aabb7.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421 \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u043a\u043e\u0439<\/figcaption><\/div>\n<\/figure>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7ee\/3b5\/6d8\/7ee3b56d8a709c2db1f2f80347f95f91.png\" alt=\"\u0421\u0442\u0430\u0442\u0443\u0441 &quot;\u041d\u0435\u0442 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435&quot;\" title=\"\u0421\u0442\u0430\u0442\u0443\u0441 &quot;\u041d\u0435\u0442 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435&quot;\" width=\"314\" height=\"56\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/7ee\/3b5\/6d8\/7ee3b56d8a709c2db1f2f80347f95f91.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7ee\/3b5\/6d8\/7ee3b56d8a709c2db1f2f80347f95f91.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421\u0442\u0430\u0442\u0443\u0441 &#171;\u041d\u0435\u0442 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435&#187;<\/figcaption><\/div>\n<\/figure>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0439\u0434\u0435\u043c \u0432 \u0434\u043e\u0442\u043a\u0443<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f1b\/a5d\/fb8\/f1ba5dfb8551b7a7e52aa8717b798d4f.png\" alt=\"Dota 2\" title=\"Dota 2\" width=\"382\" height=\"97\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/f1b\/a5d\/fb8\/f1ba5dfb8551b7a7e52aa8717b798d4f.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f1b\/a5d\/fb8\/f1ba5dfb8551b7a7e52aa8717b798d4f.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Dota 2<\/figcaption><\/div>\n<\/figure>\n<h2>\u0418\u0442\u043e\u0433<\/h2>\n<p>\u0412 \u043f\u0440\u043e\u0447\u0435\u043c, \u043c\u043e\u0436\u043d\u043e \u0438 \u043f\u043e\u0439\u0442\u0438 \u0434\u0430\u043b\u044c\u0448\u0435, \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c \u0438\u0434\u0435\u044e \u0438 \u0442.\u0434., \u043d\u043e \u043b\u0438\u0447\u043d\u043e \u043c\u043d\u0435 \u0432\u0441\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0438 \u0442\u0430\u043a. \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u0435 \ud83d\ude00<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/926148\/\"> https:\/\/habr.com\/ru\/articles\/926148\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412\u0441\u0435\u0445 \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e. \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043d\u0435\u0439 \u043d\u0430\u0437\u0430\u0434 \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044e &#171;<a href=\"https:\/\/habr.com\/ru\/articles\/457078\/\" rel=\"noopener noreferrer nofollow\">\u041a\u0430\u043a \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u0430\u0432\u0430\u0442\u0430\u0440\u043a\u0443 \u0432 Telegram \u0432 \u0447\u0430\u0441\u044b<\/a>&#171;. \u042f \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0441\u0430\u043c, \u043d\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f\u043c\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u043f\u0430\u043c\u0435\u0440\u043e\u0432 \u0432 \u0447\u0430\u0442\u0430\u0445. \u0410 \u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e, \u0442\u043e \u043c\u043d\u0435 \u0432\u044b\u0434\u0430\u0432\u0430\u043b\u0438 \u0444\u043b\u0443\u0434-\u0431\u0430\u043d \u0438 \u044f \u043d\u0435 \u043c\u043e\u0433 \u043c\u0435\u043d\u044f\u0442\u044c \u0441\u0432\u043e\u044e \u0430\u0432\u0430\u0442\u0430\u0440\u043a\u0443 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0439 21 \u0447\u0430\u0441.<\/p>\n<p>\u042f \u043f\u0435\u0440\u0435\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u043a\u0443\u0447\u0443 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u0438\u0431\u043e \u0437\u0430\u0434\u0443\u043c\u043a\u0430 \u043c\u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c. \u041d\u043e \u043d\u0438\u043a\u0430\u043a\u0438\u0435 \u0442\u0430\u0439\u043c\u0438\u043d\u0433\u0438 \u043d\u0435 \u043c\u043e\u0433\u043b\u0438 \u0441\u043f\u0430\u0441\u0442\u0438 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u0432\u044b\u043a\u0430\u0442\u0438\u0442\u044c \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0438\u0437 \u0442\u043e\u043b\u043f\u044b, \u0445\u043e\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u043e\u043d \u0438 \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u0435\u0435 \u0437\u0430\u043c\u0435\u0442\u043d\u044b\u0439.<\/p>\n<h2>\u0417\u0430\u0434\u0443\u043c\u043a\u0430<\/h2>\n<p>\u0417\u0430\u0434\u0443\u043c\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 \u043c\u043e\u0435\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430 Steam. \u041f\u0440\u0438 \u0441\u043c\u0435\u043d\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u0430, \u0431\u0443\u0434\u044c \u0442\u043e \u0432 \u0438\u0433\u0440\u0435, \u0431\u0443\u0434\u044c \u0442\u043e \u043d\u0435 \u0432 \u0441\u0435\u0442\u0438, \u043c\u043e\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0432 Telegram \u0431\u0443\u0434\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u0435\u043d \u0441\u0435\u0440\u0432\u0430\u043a \u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u043d\u0430\u043d\u0438\u044f<\/p>\n<h2>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h2>\n<p>\u0411\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Python, \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 Steam \u043e\u0434\u043d\u043e\u0438\u043c\u0435\u043d\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u0430 \u0434\u043b\u044f Telegram \u0441\u0442\u0430\u0440\u044b\u0439 \u0434\u043e\u0431\u0440\u044b\u0439 <a href=\"https:\/\/pypi.org\/project\/Telethon\/\" rel=\"noopener noreferrer nofollow\">telethon<\/a>.<\/p>\n<pre><code>pip install Telethon pip install steam<\/code><\/pre>\n<p>\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u043c\u043e\u0434\u0443\u043b\u0438<\/p>\n<pre><code class=\"python\">from telethon import TelegramClient, sync import time import steam.webapi from steam.steamid import SteamID from telethon import TelegramClient, events from telethon.tl.functions.account import UpdateProfileRequest<\/code><\/pre>\n<p>\u041f\u043e\u0442\u043e\u043c \u043f\u043e\u044f\u0441\u043d\u044e, \u0447\u0442\u043e \u043a\u0443\u0434\u0430 \u0438 \u0433\u0434\u0435 \ud83d\ude00<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u044b \u0438 \u0437\u0430\u0434\u0430\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f<\/p>\n<pre><code class=\"python\">API_KEY = '' # \u0412\u0430\u0448 API \u043a\u043b\u044e\u0447 Steam (\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0434\u0435\u0441\u044c: https:\/\/steamcommunity.com\/dev\/apikey) profile_url = \"https:\/\/bit.ly\/steam_com\"  # steam \u043f\u0440\u043e\u0444\u0438\u043b\u044c max_symvols = 70 # \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u0435 :D steam_id = 123456  # steam id client = TelegramClient(\"anon\", api_id, \"api_hash\") client.start() steam_api = steam.webapi.WebAPI(API_KEY)<\/code><\/pre>\n<p><strong> API_KEY<\/strong> &#8212; \u0412\u0430\u0448 API \u043a\u043b\u044e\u0447 Steam (\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/steamcommunity.com\/dev\/apikey\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>).<br \/> <strong>profile_url<\/strong> &#8212; \u0412\u0430\u0448 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0432 Steam. \u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435\u043b\u044c\u0437\u044f \u0432\u0437\u044f\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0438\u0437 \u0430\u043f\u0438\u0448\u043a\u0438? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0435\u0433\u043e \u043f\u043e-\u0445\u043e\u0440\u043e\u0448\u0435\u043c\u0443 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0447\u0435\u0440\u0435\u0437 \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u043b\u043a\u0443 \u0441\u0441\u044b\u043b\u043a\u0443. \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b<a href=\"https:\/\/app.bitly.com\/\" rel=\"noopener noreferrer nofollow\"> bitly<\/a>.<br \/> <strong>max_symvols<\/strong> &#8212; \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 Telegram. \u0414\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0438 \u043e\u0442\u0434\u0435\u043b\u0438\u043b \u0435\u0433\u043e \u043e\u0442 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<br \/> <strong>steam_id<\/strong> &#8212; \u0412\u0430\u0448 id \u0432 steam.<br \/><strong> client<\/strong> &#8212; \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0430 telethon. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0437\u044f\u0442\u044c api_id \u0438 api_hash <a href=\"https:\/\/my.telegram.org\/auth\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>. <\/p>\n<p>\u0422\u0430\u043a. \u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u0441\u043c\u0435\u043d\u044b \u0431\u0438\u043e<\/p>\n<pre><code class=\"python\">def change_bio(BIO_TEXT):     try:         client(UpdateProfileRequest(about=BIO_TEXT))         return f\"\u0411\u0438\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043e \u043d\u0430: {BIO_TEXT}\"     except Exception as e:         return f\"\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0431\u0438\u043e: {e}\"<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u0435\u0440\u043d\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0438\u043e. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043d\u0435\u0447\u0435\u0433\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c.<\/p>\n<p>\u041d\u0430\u043f\u0438\u0448\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0443\u0441\u0430 Steam<\/p>\n<pre><code class=\"python\">def get_account_status(steam_id):     try:         steamid64 = SteamID(steam_id).as_64                  response = steam_api.call('ISteamUser.GetPlayerSummaries', steamids=steamid64, format='json')                  if not response['response']['players']:             return {\"error\": \"\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\"}                      player = response['response']['players'][0]          profile_url = player[\"profileurl\"]         if 'gameextrainfo' in player:             status = f\"\u0432 \u0438\u0433\u0440\u0435: {player['gameextrainfo']}\"         elif player['personastate'] == 1:             status = \"\u0432 \u0441\u0435\u0442\u0438\"         elif player['personastate'] == 2:             status = \"\u0437\u0430\u043d\u044f\u0442\"         elif player['personastate'] == 3:             status = \"\u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442\"         elif player['personastate'] == 4:             status = \": \u043d\u0435 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c\"         else:             status = \"\u043d\u0435 \u0432 \u0441\u0435\u0442\u0438\"                      return   [status, player[\"personaname\"]]     except Exception as e:         return {\"error\": str(e)}<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0443\u0436\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0435. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0432 64-\u0431\u0438\u0442\u043d\u044b\u0439 SteamID, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0435 <code>response = steam_<\/code><a href=\"http:\/\/api.call\" rel=\"noopener noreferrer nofollow\"><code>api.call<\/code><\/a><code>('ISteamUser.GetPlayerSummaries', steamids=steamid64, format='json')<\/code><br \/>\u041d\u0443 \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0432\u0435\u0440\u044f\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043c\u0430\u0441\u0441\u0438\u0432, \u0433\u0434\u0435 \u043d\u0430 \u043d\u0443\u043b\u0435\u0432\u043e\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0435 \u0441\u0442\u0430\u0442\u0443\u0441, \u0430 \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c username \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043f\u0438\u0448\u0435\u043c  \u0444\u0443\u043d\u043a\u0446\u0438\u044e main<\/p>\n<pre><code class=\"python\">def main():     old_status = \"\"     while True:         profile = get_account_status(steam_id)         if old_status != profile[0]:             game_max = max_symvols - len(f\"\u0418\u0433\u0440\u043e\u043a {profile[1]}  | url: {profile_url}\") - 3             if len(profile[0]) &gt; game_max:                 gg = \"\"                 for x in range(game_max):                     gg  += list(profile[0])[x]                 profile[0] = gg + \"...\"             old_status = profile[0]             new_status = f\"\u0418\u0433\u0440\u043e\u043a {profile[1]} {profile[0]} | url: {profile_url}\"             result = change_bio(new_status)             print(result)         time.sleep(15)  <\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044b \u043a\u0430\u0436\u0434\u044b\u0435 15 \u0441\u0435\u043a\u0443\u043d\u0434 \u0434\u043b\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0443\u0441\u0430. \u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u043a\u0440\u0430\u0449\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438\u0433\u0440\u044b, \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u043c.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">from telethon import TelegramClient, sync import time import steam.webapi from steam.steamid import SteamID from telethon import TelegramClient, events from telethon.tl.functions.account import UpdateProfileRequest  API_KEY = '' # \u0412\u0430\u0448 API \u043a\u043b\u044e\u0447 Steam (\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0434\u0435\u0441\u044c: https:\/\/steamcommunity.com\/dev\/apikey) profile_url = \"https:\/\/bit.ly\/steam_com\"  # steam \u043f\u0440\u043e\u0444\u0438\u043b\u044c max_symvols = 70 # \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u0435 :D steam_id = 123456  # steam id client = TelegramClient(\"anon\", api_id, \"api_hash\") client.start() steam_api = steam.webapi.WebAPI(API_KEY)  def change_bio(BIO_TEXT):     try:         client(UpdateProfileRequest(about=BIO_TEXT))         return f\"\u0411\u0438\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043e \u043d\u0430: {BIO_TEXT}\"     except Exception as e:         return f\"\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0431\u0438\u043e: {e}\" def get_account_status(steam_id):     try:         steamid64 = SteamID(steam_id).as_64                  response = steam_api.call('ISteamUser.GetPlayerSummaries', steamids=steamid64, format='json')                  if not response['response']['players']:             return {\"error\": \"\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\"}                      player = response['response']['players'][0]          profile_url = player[\"profileurl\"]         if 'gameextrainfo' in player:             status = f\"\u0432 \u0438\u0433\u0440\u0435: {player['gameextrainfo']}\"         elif player['personastate'] == 1:             status = \"\u0432 \u0441\u0435\u0442\u0438\"         elif player['personastate'] == 2:             status = \"\u0437\u0430\u043d\u044f\u0442\"         elif player['personastate'] == 3:             status = \"\u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442\"         elif player['personastate'] == 4:             status = \": \u043d\u0435 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0438\u0442\u044c\"         else:             status = \"\u043d\u0435 \u0432 \u0441\u0435\u0442\u0438\"                      return   [status, player[\"personaname\"]]     except Exception as e:         return {\"error\": str(e)}  def main():     old_status = \"\"     while True:         profile = get_account_status(steam_id)         if old_status != profile[0]:             game_max = max_symvols - len(f\"\u0418\u0433\u0440\u043e\u043a {profile[1]}  | url: {profile_url}\") - 3             if len(profile[0]) &gt; game_max:                 gg = \"\"                 for x in range(game_max):                     gg  += list(profile[0])[x]                 profile[0] = gg + \"...\"             old_status = profile[0]             new_status = f\"\u0418\u0433\u0440\u043e\u043a {profile[1]} {profile[0]} | url: {profile_url}\"             result = change_bio(new_status)             print(result)         time.sleep(15)   if __name__ == \"__main__\":     main()<\/code><\/pre>\n<\/div>\n<\/details>\n<h2>\u0421\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435<\/h2>\n<figure class=\"\">\n<div><figcaption>\u0421\u0442\u0430\u0442\u0443\u0441 &#171;\u0412 \u0441\u0435\u0442\u0438&#187;<\/figcaption><\/div>\n<\/figure>\n<figure class=\"\">\n<div><figcaption>\u0421 \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u043a\u043e\u0439<\/figcaption><\/div>\n<\/figure>\n<figure class=\"\">\n<div><figcaption>\u0421\u0442\u0430\u0442\u0443\u0441 &#171;\u041d\u0435\u0442 \u043d\u0430 \u043c\u0435\u0441\u0442\u0435&#187;<\/figcaption><\/div>\n<\/figure>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0439\u0434\u0435\u043c \u0432 \u0434\u043e\u0442\u043a\u0443<\/p>\n<figure class=\"\">\n<div><figcaption>Dota 2<\/figcaption><\/div>\n<\/figure>\n<h2>\u0418\u0442\u043e\u0433<\/h2>\n<p>\u0412 \u043f\u0440\u043e\u0447\u0435\u043c, \u043c\u043e\u0436\u043d\u043e \u0438 \u043f\u043e\u0439\u0442\u0438 \u0434\u0430\u043b\u044c\u0448\u0435, \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0442\u044c \u0438\u0434\u0435\u044e \u0438 \u0442.\u0434., \u043d\u043e \u043b\u0438\u0447\u043d\u043e \u043c\u043d\u0435 \u0432\u0441\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0438 \u0442\u0430\u043a. \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u0435 \ud83d\ude00<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/926148\/\"> https:\/\/habr.com\/ru\/articles\/926148\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-466528","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/466528","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=466528"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/466528\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=466528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=466528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=466528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}