{"id":2138,"date":"2021-07-16T07:09:30","date_gmt":"2021-07-16T07:09:30","guid":{"rendered":"https:\/\/www.bearloga.space\/?page_id=2138"},"modified":"2021-07-16T07:09:31","modified_gmt":"2021-07-16T07:09:31","slug":"kak-sozdat-chat-bota-dlya-telegram-s-pomoshhyu-python","status":"publish","type":"page","link":"https:\/\/www.bearloga.space\/uk\/kak-sozdat-chat-bota-dlya-telegram-s-pomoshhyu-python\/","title":{"rendered":"\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0447\u0430\u0442-\u0431\u043e\u0442\u0430 \u0434\u043b\u044f Telegram \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Python"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043e:&nbsp;12.06.2020<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u042d\u0442\u043e \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0431\u043e\u0442\u0430 \u0434\u043b\u044f Telegram. \u0411\u043e\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043a\u0443\u0440\u0441\u044b \u0432\u0430\u043b\u044e\u0442, \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u043a\u0443\u0440\u0441\u043e\u043c \u0440\u0430\u043d\u044c\u0448\u0435 \u0438 \u0441\u0435\u0439\u0447\u0430\u0441, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u0434\u0435\u043b\u0443 \u0438 \u0443\u0437\u043d\u0430\u0442\u044c \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0431\u043e\u0442\u043e\u0432 \u0432 Telegram.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0448\u0430\u0433-\u21160-\u043d\u0435\u043c\u043d\u043e\u0433\u043e-\u0442\u0435\u043e\u0440\u0438\u0438-\u043e\u0431-api-telegram-\u0431\u043e\u0442\u043e\u0432\">\u0428\u0430\u0433 \u21160: \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0442\u0435\u043e\u0440\u0438\u0438 \u043e\u0431 API Telegram-\u0431\u043e\u0442\u043e\u0432<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u041d\u0430\u0447\u0430\u0442\u044c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0441\u0442\u043e\u0438\u0442 \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0432\u043e\u043f\u0440\u043e\u0441\u0430: \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0447\u0430\u0442-\u0431\u043e\u0442\u043e\u0432 \u0432 Telegram?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041e\u0442\u0432\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439: \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0438 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043d\u0430\u0437\u0430\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f API HTML. \u042d\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f URL:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;api.telegram.org\/bot\/METHOD_NAME\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u043e\u043a\u0435\u043d \u2014 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0438\u0437 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u0443\u0436\u043d\u0430 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u043e\u0434\u043b\u0438\u043d\u043d\u043e\u0441\u0442\u044c \u0431\u043e\u0442\u0430 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0422\u043e\u043a\u0435\u043d \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0431\u043e\u0442\u0430. METHOD_NAME \u2014 \u044d\u0442\u043e \u043c\u0435\u0442\u043e\u0434, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440,&nbsp;<code>getUpdates<\/code>,&nbsp;<code>sendMessage<\/code>,&nbsp;<code>getChat<\/code>&nbsp;\u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u043e\u043a\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0430\u043a:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0414\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043a\u0430\u043a GET, \u0442\u0430\u043a \u0438&nbsp;<a href=\"https:\/\/pythonru.com\/biblioteki\/kratkoe-rukovodstvo-po-biblioteke-python-requests\" target=\"_blank\" rel=\"noopener\">POST \u0437\u0430\u043f\u0440\u043e\u0441\u044b<\/a>. \u041c\u043d\u043e\u0433\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 (\u043c\u0435\u0442\u043e\u0434\u0443&nbsp;<code>sendMessage<\/code>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c chat_id \u0438 \u0442\u0435\u043a\u0441\u0442). \u042d\u0442\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u044b \u043a\u0430\u043a \u0441\u0442\u0440\u043e\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 URL, application\/x-www-form-urlencoded \u0438 application-json (\u043a\u0440\u043e\u043c\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0444\u0430\u0439\u043b\u043e\u0432). \u0415\u0449\u0435 \u043e\u0434\u043d\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435 \u2014 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430 UTF-8.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u043e\u0441\u043b\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a API, \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u043e\u0442\u0432\u0435\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430&nbsp;<code>getME<\/code>, \u043e\u0442\u0432\u0435\u0442 \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u043e\u0439:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>GET https:\/\/api.telegram.org\/bot&lt;token&gt;\/getMe\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n   ok: true,\n   result: {\n       id: 231757398,\n       first_name: \"Exchange Rate Bot\",\n       username: \"exchangetestbot\"\n   }\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0415\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u2018ok\u2019 \u2014 true, \u0437\u043d\u0430\u0447\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0431\u044b\u043b \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u0441\u044f \u0432 \u043f\u043e\u043b\u0435 \u2018field\u2019. \u0415\u0441\u043b\u0438 false \u2014 \u0432 \u043f\u043e\u043b\u0435 \u2018description\u2019 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0435.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 API Telegram-\u0431\u043e\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438&nbsp;<a href=\"https:\/\/core.telegram.org\/bots\/api\" target=\"_blank\" rel=\"noreferrer noopener\">\u0437\u0434\u0435\u0441\u044c (ENG)<\/a>&nbsp;\u0438\u043b\u0438 \u0441 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u043c&nbsp;<a href=\"https:\/\/tlgrm.ru\/docs\/bots\/api\" target=\"_blank\" rel=\"noreferrer noopener\">\u0437\u0434\u0435\u0441\u044c (\u0440\u0443)<\/a>&nbsp;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u043e\u043f\u0440\u043e\u0441:&nbsp;<strong>\u043a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0415\u0441\u0442\u044c \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u0435\u0440\u0432\u044b\u0439 \u2014 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430&nbsp;<code>getUpdates<\/code>. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043c\u0430\u0441\u0441\u0438\u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432&nbsp;<code>Update<\/code>. \u042d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0434\u043b\u0438\u043d\u043d\u044b\u0445 \u043e\u043f\u0440\u043e\u0441\u043e\u0432 (long polling), \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441. \u0427\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0434\u043d\u0438\u0445 \u0438 \u0442\u0435\u0445 \u0436\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440&nbsp;<code>offset<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u0442\u043e\u0440\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c webhooks. \u041c\u0435\u0442\u043e\u0434&nbsp;<code>setWebhook<\/code>&nbsp;\u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e Telegram \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u0441\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 URL-\u0430\u0434\u0440\u0435\u0441, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043d\u0438 \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u2014 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c HTTPS, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b, \u0437\u0430\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0435 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041a\u0430\u043a \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434? \u041c\u0435\u0442\u043e\u0434&nbsp;<code>getUpdates<\/code>&nbsp;\u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442, \u0435\u0441\u043b\u0438:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u0412\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u043b\u0438 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c HTTPS \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/li><li>\u0412\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0441\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u044b\u043c\u0438 \u044f\u0437\u044b\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u043e\u0436\u043d\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440.<\/li><li>\u0423 \u0431\u043e\u0442\u0430 \u0432\u044b\u0441\u043e\u043a\u0430\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430.<\/li><li>\u0412\u044b \u043c\u0435\u043d\u044f\u0435\u0442\u0435 \u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u043e\u0442\u0430 \u0432\u0440\u0435\u043c\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u041c\u0435\u0442\u043e\u0434 \u0441 Webhook \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0432 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u0412\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0432\u0435\u0431-\u044f\u0437\u044b\u043a\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, PHP).<\/li><li>\u0423 \u0431\u043e\u0442\u0430 \u043d\u0438\u0437\u043a\u0430\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430, \u0438 \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0432\u0440\u0443\u0447\u043d\u0443\u044e.<\/li><li>\u0411\u043e\u0442 \u043d\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0439 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440.<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 \u044d\u0442\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0442\u043e\u0434&nbsp;<code>getUpdates<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0415\u0449\u0435 \u043e\u0434\u0438\u043d \u0432\u043e\u043f\u0440\u043e\u0441:&nbsp;<strong>\u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u0442\u0430?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/telegram.me\/BotFather\" target=\"_blank\" rel=\"noreferrer noopener\">@BotFather<\/a>&nbsp;\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u043e\u0442\u043e\u0432 \u0432 Telegram. \u041e\u043d \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 (\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u0444\u043e\u0442\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044f, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u0430\u0441\u0441\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u044e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 API Telegram-\u0431\u043e\u0442\u0430. \u0412\u043e\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Python<\/strong><br><a href=\"https:\/\/github.com\/eternnoir\/pyTelegramBotAPI\" target=\"_blank\" rel=\"noreferrer noopener\">pyTelegramBotAPI (TeleBot)<\/a><br><a href=\"https:\/\/github.com\/nickoala\/telepot\" target=\"_blank\" rel=\"noreferrer noopener\">Telepot<\/a><br><a href=\"https:\/\/github.com\/aiogram\/aiogram\" target=\"_blank\" rel=\"noreferrer noopener\">Aiogram<\/a><\/li><li><strong>PHP<\/strong><br><a href=\"https:\/\/github.com\/irazasyed\/telegram-bot-sdk\" target=\"_blank\" rel=\"noreferrer noopener\">Telegram Bot API \u2014 PHP SDK + Laravel Integration<\/a><\/li><li><strong>Java<\/strong><br><a href=\"https:\/\/github.com\/rubenlagus\/TelegramBots\" target=\"_blank\" rel=\"noreferrer noopener\">TelegramBots<\/a><\/li><li><strong>NodeJS<\/strong><br><a href=\"https:\/\/github.com\/naltox\/telegram-node-bot\" target=\"_blank\" rel=\"noreferrer noopener\">Telegram Node Bot<\/a><\/li><li><strong>Ruby<\/strong><br><a href=\"https:\/\/github.com\/eljojo\/telegram_bot\" target=\"_blank\" rel=\"noreferrer noopener\">Telegram Bot<\/a><\/li><li><strong>C#<\/strong><br><a href=\"https:\/\/github.com\/MrRoundRobin\/telegram.bot\" target=\"_blank\" rel=\"noreferrer noopener\">Telegram Bot API LIbrary<\/a><\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u043e \u0441\u0432\u043e\u0435\u0439 \u0441\u0443\u0442\u0438, \u0432\u0441\u0435 \u044d\u0442\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u2014 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0438 HTML-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0411\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0438\u0437 \u043d\u0438\u0445 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e&nbsp;<a href=\"https:\/\/pythonru.com\/tag\/oop\" target=\"_blank\" rel=\"noopener\">\u043f\u0440\u0438\u043d\u0446\u0438\u043f\u043e\u0432 \u041e\u041e\u041f<\/a>. \u0422\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 Telegram Bot API \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0432\u0438\u0434\u0435 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 \u044d\u0442\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 pyTelegramBotApi.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0448\u0430\u0433-\u21161-\u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c-\u0437\u0430\u043f\u0440\u043e\u0441\u044b-\u043a\u0443\u0440\u0441\u043e\u0432-\u0432\u0430\u043b\u044e\u0442\">\u0428\u0430\u0433 \u21161: \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a\u0443\u0440\u0441\u043e\u0432 \u0432\u0430\u043b\u044e\u0442<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u0412\u0435\u0441\u044c \u043a\u043e\u0434 \u0431\u044b\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d \u043d\u0430 \u0432\u0435\u0440\u0441\u0438\u0438 Python==3.7 c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a:<br>pyTelegramBotAPI==3.6.6<br>pytz==2019.1<br>requests==2.7.0<\/p><\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">\u041d\u0430\u0447\u0430\u0442\u044c \u0441\u0442\u043e\u0438\u0442 \u0441 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f Python-\u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a\u0443\u0440\u0441\u043e\u0432 \u0432\u0430\u043b\u044e\u0442. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u043c PrivatBank API. URL:&nbsp;<a href=\"https:\/\/api.privatbank.ua\/p24api\/pubinfo?json&amp;exchange&amp;coursid=5\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/api.privatbank.ua\/p24api\/pubinfo?json&amp;exchange&amp;coursid=5<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;\n    {\n        ccy:\"USD\",\n\tbase_ccy:\"UAH\",\n        buy:\"25.90000\",\n        sale:\"26.25000\"\n    },\n    {\n\tccy:\"EUR\",\n        base_ccy:\"UAH\",\n        buy:\"29.10000\",\n        sale:\"29.85000\"\n    },\n    {\n        ccy:\"RUR\",\n        base_ccy:\"UAH\",\n        buy:\"0.37800\",\n        sale:\"0.41800\"\n    },\n    {\n        ccy:\"BTC\",\n        base_ccy:\"USD\",\n        buy:\"11220.0384\",\n        sale:\"12401.0950\"\n    }\n]\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b&nbsp;<code>pb.py<\/code>&nbsp;\u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043a\u043e\u0434\u043e\u043c:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import re  \nimport requests  \nimport json  \n  \n  \nURL = 'https:\/\/api.privatbank.ua\/p24api\/pubinfo?json&amp;exchange&amp;coursid=5'  \n  \n  \ndef load_exchange():  \n    return json.loads(requests.get(URL).text)  \n  \n  \ndef get_exchange(ccy_key):  \n    for exc in load_exchange():  \n        if ccy_key == exc&#91;'ccy']:  \n            return exc  \n    return False  \n  \n  \ndef get_exchanges(ccy_pattern):  \n    result = &#91;]  \n    ccy_pattern = re.escape(ccy_pattern) + '.*'  \n  for exc in load_exchange():  \n        if re.match(ccy_pattern, exc&#91;'ccy'], re.IGNORECASE) is not None:  \n            result.append(exc)  \n    return result\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0411\u044b\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>load_exchange<\/code>: \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u043a\u0443\u0440\u0441\u044b \u0432\u0430\u043b\u044e\u0442 \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 URL-\u0430\u0434\u0440\u0435\u0441\u0443 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u0445 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435&nbsp;<a href=\"https:\/\/pythonru.com\/uroki\/slovar-dict-uroki-po-python-dlja-nachinajushhih\" target=\"_blank\" rel=\"noopener\">\u0441\u043b\u043e\u0432\u0430\u0440\u044f(dict)<\/a>.<\/li><li><code>get_exchange<\/code>: \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u0443\u0440\u0441\u044b \u0432\u0430\u043b\u044e\u0442 \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d\u043d\u043e\u0439 \u0432\u0430\u043b\u044e\u0442\u0435.<\/li><li><code>get_exchanges<\/code>: \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0430\u043b\u044e\u0442 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c (\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0432\u0430\u043b\u044e\u0442 \u0432\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445).<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0448\u0430\u0433-\u21162-\u0441\u043e\u0437\u0434\u0430\u0442\u044c-telegram-\u0431\u043e\u0442\u0430-\u0441-\u043f\u043e\u043c\u043e\u0449\u044c\u044e-botfather\">\u0428\u0430\u0433 \u21162: \u0441\u043e\u0437\u0434\u0430\u0442\u044c Telegram-\u0431\u043e\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e @BotFather<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u0431\u043e\u0442\u0443&nbsp;<a href=\"https:\/\/telegram.me\/BotFather\" target=\"_blank\" rel=\"noreferrer noopener\">@BotFather<\/a>, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0447\u0430\u0442-\u043a\u043e\u043c\u0430\u043d\u0434 \u0432 Telegram. \u0414\u0430\u043b\u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0431\u0440\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443&nbsp;<code>\/newbot<\/code>&nbsp;\u0434\u043b\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0432\u044b\u0431\u043e\u0440\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438 \u0438\u043c\u0435\u043d\u0438 \u0431\u043e\u0442\u0430. \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u043e\u0442\u0430 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Done! Congratulations on your new bot. You will find it at telegram.me\/&lt;username&gt;. \nYou can now add a description, about section and profile picture for your bot, see \/help for a list of commands. \nBy the way, when you've finished creating your cool bot, ping our Bot Support if you want a better username for it. \nJust make sure the bot is fully operational before you do this.\n\nUse this token to access the HTTP API:\n&lt;token&gt; (here goes the bot\u2019s token)\n\nFor a description of the Bot API, see this page: https:\/\/core.telegram.org\/bots\/api\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0415\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438 \u0442\u0435\u043a\u0441\u0442 \u043e \u0431\u043e\u0442\u0435 (\u043a\u043e\u043c\u0430\u043d\u0434\u044b&nbsp;<code>\/setdescription<\/code>&nbsp;\u0438&nbsp;<code>\/setabouttext<\/code>), \u0444\u043e\u0442\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044f (<code>\/setuserpic<\/code>), \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c (<code>\/setinline<\/code>), \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434 (<code>\/setcommands<\/code>). \u041f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b:&nbsp;<code>\/help<\/code>&nbsp;\u0438&nbsp;<code>\/exchange<\/code>. \u0421\u0442\u043e\u0438\u0442 \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0445 \u0432&nbsp;<code>\/setcommands<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u0430, \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043a\u043e\u0434\u0430. \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0431&nbsp;<a href=\"https:\/\/core.telegram.org\/bots\/api#authorizing-your-bot\" target=\"_blank\" rel=\"noreferrer noopener\">API \u0438 \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/a>, \u0447\u0442\u043e\u0431\u044b \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u0442\u043e, \u043e \u0447\u0435\u043c \u043f\u043e\u0439\u0434\u0435\u0442 \u0440\u0435\u0447\u044c \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0448\u0430\u0433-\u21163-\u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c-\u0438-\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c-\u0431\u043e\u0442\u0430\">\u0428\u0430\u0433 \u21163: \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0431\u043e\u0442\u0430<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u0430&nbsp;<code>config.py<\/code>&nbsp;\u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>TOKEN = '&lt;bot token&gt;'  # \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u0442\u043e\u043a\u0435\u043d \u0441\u0432\u043e\u0435\u0433\u043e \u0431\u043e\u0442\u0430\nTIMEZONE = 'Europe\/Kiev'\nTIMEZONE_COMMON_NAME = 'Kiev'\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 \u044d\u0442\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u044b: \u0442\u043e\u043a\u0435\u043d \u0431\u043e\u0442\u0430 \u0438 \u0447\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0442\u043e\u0442 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c (\u044d\u0442\u043e \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439. API Telegram \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0438\u0434\u0435\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0437\u043e\u043d\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u043e\u0439 \u043e \u0447\u0430\u0441\u043e\u0432\u043e\u043c \u043f\u043e\u044f\u0441\u0435).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b&nbsp;<code>bot.py<\/code>. \u041d\u0443\u0436\u043d\u043e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0444\u0430\u0439\u043b\u044b \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u0438 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439&nbsp;<code>pb.py<\/code>. \u0415\u0441\u043b\u0438 \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442, \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e&nbsp;<code>pip<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import telebot\nimport config\nimport pb\nimport datetime\nimport pytz\nimport json\nimport traceback\n\n\nP_TIMEZONE = pytz.timezone(config.TIMEZONE)\nTIMEZONE_COMMON_NAME = config.TIMEZONE_COMMON_NAME\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0431\u043e\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 pyTelegramBotAPI. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0443 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>bot.py<\/p><\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code>bot = telebot.TeleBot(config.TOKEN)\nbot.polling(none_stop=True)\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0448\u0430\u0433-\u21164-\u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a-\u043a\u043e\u043c\u0430\u043d\u0434\u044b-start\">\u0428\u0430\u0433 \u21164: \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u044b \/start<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u0435\u043f\u0435\u0440\u044c \u0447\u0430\u0442-\u0431\u043e\u0442 \u043d\u0430 Python \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430&nbsp;<code>getUpdates<\/code>. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440&nbsp;<code>none_stop<\/code>&nbsp;\u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0438\u0441\u044c, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 API \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443 \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u0430.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0418\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0431\u043e\u0442\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b API Telegram-\u0431\u043e\u0442\u0430.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b&nbsp;<code>\/start<\/code>&nbsp;\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0434 \u0441\u0442\u0440\u043e\u043a\u043e\u0439&nbsp;<code>bot.polling(none_stop=True)<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@bot.message_handler(commands=&#91;'start'])  \ndef start_command(message):  \n    bot.send_message(  \n        message.chat.id,  \n        'Greetings! I can show you exchange rates.\\n' +  \n        'To get the exchange rates press \/exchange.\\n' +  \n        'To get help press \/help.'  \n  )\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u0438\u0434\u0435\u0442\u044c, pyTelegramBotApi \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442&nbsp;<a href=\"https:\/\/pythonru.com\/osnovy\/rukovodstvo-po-dekoratoram-python\" target=\"_blank\" rel=\"noopener\">\u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u044b Python<\/a>&nbsp;\u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 Telegram. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e&nbsp;<a href=\"https:\/\/pythonru.com\/primery\/primery-primeneniya-regulyarnyh-vyrazheniy-v-python\" target=\"_blank\" rel=\"noopener\">\u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439<\/a>, \u0443\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u0442\u0438\u043f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0432 \u043d\u0438\u0445 \u0438 \u043b\u044f\u043c\u0431\u0434\u0430-\u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u043b\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u0435&nbsp;<code>commands=['start']<\/code>&nbsp;\u0440\u0430\u0432\u043d\u043e&nbsp;<code>True<\/code>, \u0442\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f&nbsp;<code>start_command<\/code>. \u041e\u0431\u044a\u0435\u043a\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f (\u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0442\u0438\u043f&nbsp;<code>Message<\/code>) \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0435&nbsp;<code>send_message<\/code>&nbsp;\u0432 \u0442\u043e\u043c \u0436\u0435 \u0447\u0430\u0442\u0435 \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435\u043c.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u042d\u0442\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u043d\u0435 \u0442\u0430\u043a \u043b\u0438?<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0448\u0430\u0433-\u21165-\u0441\u043e\u0437\u0434\u0430\u0442\u044c-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a-\u043a\u043e\u043c\u0430\u043d\u0434\u044b-help\">\u0428\u0430\u0433 \u21165: \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u044b \/help<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0436\u0438\u0432\u0438\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u044b&nbsp;<code>\/help<\/code>&nbsp;\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0438 \u0441\u043e \u0441\u0441\u044b\u043b\u043a\u043e\u0439 \u043d\u0430 \u0432\u0430\u0448 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0432 Telegram. \u041a\u043d\u043e\u043f\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u0430\u0433\u043b\u0430\u0432\u0438\u0442\u044c \u201cMessage the developer\u201d.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@bot.message_handler(commands=&#91;'help'])  \ndef help_command(message):  \n    keyboard = telebot.types.InlineKeyboardMarkup()  \n    keyboard.add(  \n        telebot.types.InlineKeyboardButton(  \n            'Message the developer', url='telegram.me\/artiomtb'  \n  )  \n    )  \n    bot.send_message(  \n        message.chat.id,  \n        '1) To receive a list of available currencies press \/exchange.\\n' +  \n        '2) Click on the currency you are interested in.\\n' +  \n        '3) You will receive a message containing information regarding the source and the target currencies, ' +  \n        'buying rates and selling rates.\\n' +  \n        '4) Click \u201cUpdate\u201d to receive the current information regarding the request. ' +  \n        'The bot will also show the difference between the previous and the current exchange rates.\\n' +  \n        '5) The bot supports inline. Type @&lt;botusername&gt; in any chat and the first letters of a currency.',  \n        reply_markup=keyboard  \n    )\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435, \u0431\u044b\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 (<code>reply_markup<\/code>) \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u0430&nbsp;<code>send_message<\/code>. \u041c\u0435\u0442\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0443\u044e \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0443 (<code>InlineKeyboardMarkup<\/code>) \u0441 \u043e\u0434\u043d\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u043e\u0439 (<code>InlineKeyboardButton<\/code>) \u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c: \u201cMessage the developer\u201d \u0438&nbsp;<code>url='telegram.me\/artiomtb'<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041a\u043e\u0434 \u0432\u044b\u0448\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/pythonru.com\/wp-content\/uploads\/2019\/06\/obrabotchik-komandy-help.png\" alt=\"\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u044b \/help\" title=\"\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u044b \/help\"\/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0448\u0430\u0433-\u21166-\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a-\u043a\u043e\u043c\u0430\u043d\u0434\u044b-exchange\">\u0428\u0430\u0433 \u21166: \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u044b \/exchange<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u044b&nbsp;<code>\/exchange<\/code>&nbsp;\u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043c\u0435\u043d\u044e \u0432\u044b\u0431\u043e\u0440\u0430 \u0432\u0430\u043b\u044e\u0442\u044b \u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0443\u044e \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0443 \u0441 3 \u043a\u043d\u043e\u043f\u043a\u0430\u043c\u0438: USD, EUR \u0438 RUR (\u044d\u0442\u043e \u0432\u0430\u043b\u044e\u0442\u044b, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0435 API \u0431\u0430\u043d\u043a\u0430).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@bot.message_handler(commands=&#91;'exchange'])  \ndef exchange_command(message):  \n    keyboard = telebot.types.InlineKeyboardMarkup()  \n    keyboard.row(  \n        telebot.types.InlineKeyboardButton('USD', callback_data='get-USD')  \n    )  \n    keyboard.row(  \n        telebot.types.InlineKeyboardButton('EUR', callback_data='get-EUR'),  \n        telebot.types.InlineKeyboardButton('RUR', callback_data='get-RUR')  \n    )  \n  \n    bot.send_message(  \n        message.chat.id,   \n        'Click on the currency of choice:',  \n        reply_markup=keyboard  \n    )\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u043e\u0442 \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442&nbsp;<code>InlineKeyboardButton<\/code>. \u041a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443, \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 CallbackQuery (\u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435&nbsp;<code>data<\/code>&nbsp;\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f&nbsp;<code>callback-data<\/code>) \u0432&nbsp;<code>getUpdates<\/code>. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435, \u043a\u0430\u043a\u0443\u044e \u0438\u043c\u0435\u043d\u043d\u043e \u043a\u043d\u043e\u043f\u043a\u0443 \u043d\u0430\u0436\u0430\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c, \u0438 \u043a\u0430\u043a \u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u043e\u0442 \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442&nbsp;<code>\/exchange:<\/code><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/pythonru.com\/wp-content\/uploads\/2019\/06\/obrabotchik-komandy-exchange.png\" alt=\"\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u044b \/exchange\" title=\"\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u044b \/exchange\"\/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0448\u0430\u0433-\u21167-\u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a-\u0434\u043b\u044f-\u043a\u043d\u043e\u043f\u043e\u043a-\u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439-\u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b\">\u0428\u0430\u0433 \u21167: \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0434\u043b\u044f \u043a\u043d\u043e\u043f\u043e\u043a \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 pyTelegramBot Api \u0435\u0441\u0442\u044c \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440&nbsp;<code>@bot.callback_query_handler<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442&nbsp;<code>CallbackQuery<\/code>&nbsp;\u0432\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@bot.callback_query_handler(func=lambda call: True)  \ndef iq_callback(query):  \n    data = query.data  \n    if data.startswith('get-'):  \n        get_ex_callback(query)\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043c\u0435\u0442\u043e\u0434&nbsp;<code>get_ex_callback<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def get_ex_callback(query):  \n    bot.answer_callback_query(query.id)  \n    send_exchange_result(query.message, query.data&#91;4:])\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041c\u0435\u0442\u043e\u0434&nbsp;<code>answer_callback_query<\/code>&nbsp;\u043d\u0443\u0436\u0435\u043d, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0440\u0430\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u0431\u043e\u0442 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043d\u043e\u043f\u043a\u0438. \u041e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435&nbsp;<code>send_exchange_query<\/code>. \u0415\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c&nbsp;<code>Message<\/code>&nbsp;\u0438 \u043a\u043e\u0434 \u0432\u0430\u043b\u044e\u0442\u044b (\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0437&nbsp;<code>query.data<\/code>. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, get-USD, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0439\u0442\u0435 USD).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c&nbsp;<code>send_exchange_result<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def send_exchange_result(message, ex_code):  \n    bot.send_chat_action(message.chat.id, 'typing')  \n    ex = pb.get_exchange(ex_code)  \n    bot.send_message(  \n        message.chat.id, serialize_ex(ex),  \n        reply_markup=get_update_keyboard(ex),  \n\tparse_mode='HTML'  \n    )\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u0441\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u043f\u0435\u0440\u0432\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432\u0432\u043e\u0434\u0430 \u0432 \u0447\u0430\u0442, \u0442\u0430\u043a \u0447\u0442\u043e\u0431\u044b \u0431\u043e\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u00ab\u043d\u0430\u0431\u043e\u0440\u0430 \u0442\u0435\u043a\u0441\u0442\u0430\u00bb, \u043f\u043e\u043a\u0430 API \u0431\u0430\u043d\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441. \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0437\u043e\u0432\u0435\u043c \u043c\u0435\u0442\u043e\u0434&nbsp;<code>get_exchange<\/code>&nbsp;\u0438\u0437 \u0444\u0430\u0439\u043b\u0430&nbsp;<code>pb.py<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u043a\u043e\u0434 \u0432\u0430\u043b\u044e\u0442\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, USD). \u0422\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0434\u0432\u0430 \u043d\u043e\u0432\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u0430 \u0432&nbsp;<code>send_message: serialize_ex<\/code>, \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u0430\u043b\u044e\u0442\u044b \u0438&nbsp;<code>get_update_keyboard<\/code>&nbsp;(\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 \u201cUpdate\u201d \u0438 \u201cShare\u201d).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def get_update_keyboard(ex):  \n    keyboard = telebot.types.InlineKeyboardMarkup()  \n    keyboard.row(  \n        telebot.types.InlineKeyboardButton(  \n            'Update',  \n\t    callback_data=json.dumps({  \n                't': 'u',  \n\t\t'e': {  \n                    'b': ex&#91;'buy'],  \n\t\t    's': ex&#91;'sale'],  \n\t\t    'c': ex&#91;'ccy']  \n                }  \n            }).replace(' ', '')  \n        ),  \n\ttelebot.types.InlineKeyboardButton('Share', switch_inline_query=ex&#91;'ccy'])  \n    )  \n    return keyboard\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0417\u0430\u043f\u0438\u0448\u0435\u043c \u0432&nbsp;<code>get_update_keyboard<\/code>&nbsp;\u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043a\u0443\u0440\u0441 \u0432\u0430\u043b\u044e\u0442 \u0432&nbsp;<code>callback_data<\/code>&nbsp;\u0432 \u0444\u043e\u0440\u043c\u0435 JSON. JSON \u0441\u0436\u0438\u043c\u0430\u0435\u0442\u0441\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0444\u0430\u0439\u043b\u0430 \u0440\u0430\u0432\u0435\u043d 64 \u0431\u0430\u0439\u0442\u0430\u043c.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041a\u043d\u043e\u043f\u043a\u0430&nbsp;<code>t<\/code>&nbsp;\u0437\u043d\u0430\u0447\u0438\u0442 \u0442\u0438\u043f, \u0430&nbsp;<code>e<\/code>&nbsp;\u2014 \u043e\u0431\u043c\u0435\u043d. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u043f\u043e \u0442\u043e\u043c\u0443 \u0436\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0423 \u043a\u043d\u043e\u043f\u043a\u0438&nbsp;<code>Share<\/code>&nbsp;\u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440&nbsp;<code>switch_inline_query<\/code>. \u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043d\u043e\u043f\u043a\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u0447\u0430\u0442\u043e\u0432, \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u044d\u0442\u043e\u0442 \u0447\u0430\u0442 \u0438 \u0432\u0432\u0435\u0441\u0442\u0438 \u0438\u043c\u044f \u0431\u043e\u0442\u0430 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 \u043f\u043e\u043b\u0435 \u0432\u0432\u043e\u0434\u0430.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041c\u0435\u0442\u043e\u0434\u044b&nbsp;<code>serialize_ex<\/code>&nbsp;\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439&nbsp;<code>serialize_exchange_diff<\/code>&nbsp;\u043d\u0443\u0436\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u0442\u0435\u043a\u0443\u0449\u0438\u043c \u0438 \u0441\u0442\u0430\u0440\u044b\u043c\u0438 \u043a\u0443\u0440\u0441\u0430\u043c\u0438 \u0432\u0430\u043b\u044e\u0442 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043d\u043e\u043f\u043a\u0438&nbsp;<code>Update<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def serialize_ex(ex_json, diff=None):  \n    result = '&lt;b&gt;' + ex_json&#91;'base_ccy'] + ' -&gt; ' + ex_json&#91;'ccy'] + ':&lt;\/b&gt;\\n\\n' + \\  \n             'Buy: ' + ex_json&#91;'buy']  \n    if diff:  \n        result += ' ' + serialize_exchange_diff(diff&#91;'buy_diff']) + '\\n' + \\  \n                  'Sell: ' + ex_json&#91;'sale'] + \\  \n                  ' ' + serialize_exchange_diff(diff&#91;'sale_diff']) + '\\n'  \n    else:  \n        result += '\\nSell: ' + ex_json&#91;'sale'] + '\\n'  \n    return result\n\n\ndef serialize_exchange_diff(diff):  \n    result = ''  \n    if diff &gt; 0:  \n        result = '(' + str(diff) + ' &lt;img draggable=\"false\" data-mce-resize=\"false\" data-mce-placeholder=\"1\" data-wp-emoji=\"1\" class=\"emoji\" alt=\"&lt;img draggable=\"false\" data-mce-resize=\"false\" data-mce-placeholder=\"1\" data-wp-emoji=\"1\" class=\"emoji\" alt=\"&lt;img draggable=\"false\" data-mce-resize=\"false\" data-mce-placeholder=\"1\" data-wp-emoji=\"1\" class=\"emoji\" alt=\"&lt;img draggable=\"false\" data-mce-resize=\"false\" data-mce-placeholder=\"1\" data-wp-emoji=\"1\" class=\"emoji\" alt=\"&lt;img draggable=\"false\" data-mce-resize=\"false\" data-mce-placeholder=\"1\" data-wp-emoji=\"1\" class=\"emoji\" alt=\"&#x2197;&#xfe0f;\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/2.3\/svg\/2197.svg\"&gt;\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/2.3\/svg\/2197.svg\"&gt;\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/2.3\/svg\/2197.svg\"&gt;\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/72x72\/2197.png\"&gt;\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/72x72\/2197.png\"&gt;)'  \n    elif diff &lt; 0:  \n        result = '(' + str(diff)&#91;1:] + ' &lt;img draggable=\"false\" data-mce-resize=\"false\" data-mce-placeholder=\"1\" data-wp-emoji=\"1\" class=\"emoji\" alt=\"&lt;img draggable=\"false\" data-mce-resize=\"false\" data-mce-placeholder=\"1\" data-wp-emoji=\"1\" class=\"emoji\" alt=\"&lt;img draggable=\"false\" data-mce-resize=\"false\" data-mce-placeholder=\"1\" data-wp-emoji=\"1\" class=\"emoji\" alt=\"&lt;img draggable=\"false\" data-mce-resize=\"false\" data-mce-placeholder=\"1\" data-wp-emoji=\"1\" class=\"emoji\" alt=\"&lt;img draggable=\"false\" data-mce-resize=\"false\" data-mce-placeholder=\"1\" data-wp-emoji=\"1\" class=\"emoji\" alt=\"&#x2198;&#xfe0f;\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/2.3\/svg\/2198.svg\"&gt;\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/2.3\/svg\/2198.svg\"&gt;\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/2.3\/svg\/2198.svg\"&gt;\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/72x72\/2198.png\"&gt;\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/72x72\/2198.png\"&gt;)'  \n    return result\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u043c\u0435\u0442\u043e\u0434&nbsp;<code>serialize_ex<\/code>&nbsp;\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440&nbsp;<code>diff<\/code>. \u0415\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u043a\u0443\u0440\u0441\u0430\u043c\u0438 \u043e\u0431\u043c\u0435\u043d\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435&nbsp;<code>{'buy_diff': &lt;float&gt;, 'sale_diff': &lt;float&gt;}<\/code>. \u042d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043d\u043e\u043f\u043a\u0438&nbsp;<code>Update<\/code>. \u041a\u043e\u0433\u0434\u0430 \u043a\u0443\u0440\u0441\u044b \u0432\u0430\u043b\u044e\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437, \u043e\u043d \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u0435\u043d.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u043e\u0442 \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0431\u043e\u0442 \u043f\u043e\u0441\u043b\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043a\u043d\u043e\u043f\u043a\u0438 USD:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/pythonru.com\/wp-content\/uploads\/2019\/06\/otobrazhenie-kursa-valyut-botom.png\" alt=\"\u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043a\u0443\u0440\u0441\u0430 \u0432\u0430\u043b\u044e\u0442 \u0431\u043e\u0442\u043e\u043c\" title=\"\u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043a\u0443\u0440\u0441\u0430 \u0432\u0430\u043b\u044e\u0442 \u0431\u043e\u0442\u043e\u043c\"\/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0448\u0430\u0433-\u21168-\u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a-\u043a\u043d\u043e\u043f\u043a\u0438-\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f\">\u0428\u0430\u0433 \u21168: \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043a\u043d\u043e\u043f\u043a\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043a\u043d\u043e\u043f\u043a\u0438&nbsp;<code>Update<\/code>. \u041f\u043e\u0441\u043b\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430&nbsp;<code>iq_callback_method<\/code>&nbsp;\u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@bot.callback_query_handler(func=lambda call: True)  \ndef iq_callback(query):  \n    data = query.data  \n    if data.startswith('get-'):  \n        get_ex_callback(query)  \n    else:  \n        try:  \n            if json.loads(data)&#91;'t'] == 'u':  \n                edit_message_callback(query)  \n        except ValueError:  \n            pass\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0441&nbsp;<code>get-<\/code>&nbsp;(<code>get-USD<\/code>,&nbsp;<code>get-EUR<\/code>&nbsp;\u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435), \u0442\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c&nbsp;<code>get_ex_callback<\/code>, \u043a\u0430\u043a \u0440\u0430\u043d\u044c\u0448\u0435. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 JSON \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0435 \u043a\u043b\u044e\u0447&nbsp;<code>t<\/code>. \u0415\u0441\u043b\u0438 \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0432\u043d\u043e&nbsp;<code>u<\/code>, \u0442\u043e\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434&nbsp;<code>edit_message_callback<\/code>. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u044d\u0442\u043e:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def edit_message_callback(query):  \n    data = json.loads(query.data)&#91;'e']  \n    exchange_now = pb.get_exchange(data&#91;'c'])  \n    text = serialize_ex(  \n        exchange_now,  \n\tget_exchange_diff(  \n            get_ex_from_iq_data(data),  \n\t    exchange_now  \n        )  \n    ) + '\\n' + get_edited_signature()  \n    if query.message:  \n        bot.edit_message_text(  \n            text,  \n\t    query.message.chat.id,  \n\t    query.message.message_id,  \n\t    reply_markup=get_update_keyboard(exchange_now),  \n\t    parse_mode='HTML'  \n\t)  \n    elif query.inline_message_id:  \n        bot.edit_message_text(  \n            text,  \n\t    inline_message_id=query.inline_message_id,  \n\t    reply_markup=get_update_keyboard(exchange_now),  \n\t    parse_mode='HTML'  \n\t)\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442? \u041e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043a\u0443\u0440\u0441 \u0432\u0430\u043b\u044e\u0442\u044b (<code>exchange_now = pb.get_exchange(data['c'])<\/code>).<\/li><li>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0442\u0435\u043a\u0441\u0442 \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u0443\u0442\u0435\u043c \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u0443\u0440\u0441\u0430 \u0432\u0430\u043b\u044e\u0442 \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c&nbsp;<code>diff<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u043e\u0432\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 (\u043e \u043d\u0438\u0445 \u0434\u0430\u043b\u044c\u0448\u0435). \u0422\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u2014&nbsp;<code>get_edited_signature<\/code>.<\/li><li>\u0412\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u043c\u0435\u0442\u043e\u0434&nbsp;<code>edit_message_text<\/code>, \u0435\u0441\u043b\u0438 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441, \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b.<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u041c\u0435\u0442\u043e\u0434&nbsp;<code>get_ex_from_iq_data<\/code>&nbsp;\u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442 JSON \u0438\u0437&nbsp;<code>callback_data<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def get_ex_from_iq_data(exc_json):  \n    return {  \n        'buy': exc_json&#91;'b'],  \n\t'sale': exc_json&#91;'s']  \n    }\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041c\u0435\u0442\u043e\u0434&nbsp;<code>get_exchange_diff<\/code>&nbsp;\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441\u0442\u0430\u0440\u043e\u0435 \u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u0443\u0440\u0441\u043e\u0432 \u0432\u0430\u043b\u044e\u0442 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435&nbsp;<code>{'buy_diff': &lt;float&gt;, 'sale_diff': &lt;float&gt;}<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def get_exchange_diff(last, now):  \n    return {  \n        'sale_diff': float(\"%.6f\" % (float(now&#91;'sale']) - float(last&#91;'sale']))),  \n\t'buy_diff': float(\"%.6f\" % (float(now&#91;'buy']) - float(last&#91;'buy'])))  \n    }\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>get_edited_signature<\/code>&nbsp;\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0442\u0435\u043a\u0441\u0442 \u201cUpdated\u2026\u201d:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def get_edited_signature():  \n    return '&lt;i&gt;Updated ' + \\  \n           str(datetime.datetime.now(P_TIMEZONE).strftime('%H:%M:%S')) + \\  \n           ' (' + TIMEZONE_COMMON_NAME + ')&lt;\/i&gt;'\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u043a\u0443\u0440\u0441\u044b \u0432\u0430\u043b\u044e\u0442 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/pythonru.com\/wp-content\/uploads\/2019\/06\/otobrazhenie-kursa-valyut-botom-2.png\" alt=\"\u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043a\u0443\u0440\u0441\u0430 \u0432\u0430\u043b\u044e\u0442 \u0431\u043e\u0442\u043e\u043c\" title=\"\u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043a\u0443\u0440\u0441\u0430 \u0432\u0430\u043b\u044e\u0442 \u0431\u043e\u0442\u043e\u043c\"\/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u0418 \u0432\u043e\u0442 \u0442\u0430\u043a \u2014 \u0435\u0441\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/pythonru.com\/wp-content\/uploads\/2019\/06\/obnovlenie-kursa-valyut-botom.png\" alt=\"\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0443\u0440\u0441\u0430 \u0432\u0430\u043b\u044e\u0442 \u0431\u043e\u0442\u043e\u043c\" title=\"\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0443\u0440\u0441\u0430 \u0432\u0430\u043b\u044e\u0442 \u0431\u043e\u0442\u043e\u043c\"\/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0448\u0430\u0433-\u21169-\u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c-\u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439-\u0440\u0435\u0436\u0438\u043c\">\u0428\u0430\u0433 \u21169: \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0432\u0435\u0434\u0435\u0442 @ + \u0438\u043c\u044f \u0431\u043e\u0442\u0430 \u0432 \u043b\u044e\u0431\u043e\u043c \u0447\u0430\u0442\u0435, \u044d\u0442\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u0438\u0441\u043a \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 \u0438 \u0432\u044b\u0432\u0435\u0434\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b. \u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043d\u0430 \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445 \u0431\u043e\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u0442 \u0432\u0430\u0448\u0435\u0433\u043e \u0438\u043c\u0435\u043d\u0438 (\u0441 \u043f\u043e\u043c\u0435\u0442\u043a\u043e\u0439 \u201cvia bot\u201d).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@bot.inline_handler(func=lambda query: True)  \ndef query_text(inline_query):  \n    bot.answer_inline_query(  \n        inline_query.id,  \n        get_iq_articles(pb.get_exchanges(inline_query.query))  \n    )\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0441\u0442 \u043e\u0431\u044a\u0435\u043a\u0442&nbsp;<code>InlineQuery<\/code>&nbsp;\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e&nbsp;<code>query_text<\/code>. \u0412\u043d\u0443\u0442\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f&nbsp;<code>answer_line<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c&nbsp;<code>inline_query_id<\/code>&nbsp;\u0438 \u043c\u0430\u0441\u0441\u0438\u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u0438\u0441\u043a\u0430).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c&nbsp;<code>get_exchanges<\/code>&nbsp;\u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0432\u0430\u043b\u044e\u0442, \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u043f\u043e\u0434 \u0437\u0430\u043f\u0440\u043e\u0441. \u041d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u043c\u0435\u0442\u043e\u0434\u0443&nbsp;<code>get_iq_articles<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0435\u0440\u043d\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0438\u0437&nbsp;<code>InlineQueryResultArticle<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>def get_iq_articles(exchanges):  \n    result = &#91;]  \n    for exc in exchanges:  \n        result.append(  \n            telebot.types.InlineQueryResultArticle(  \n                id=exc&#91;'ccy'],  \n\t        title=exc&#91;'ccy'],  \n\t        input_message_content=telebot.types.InputTextMessageContent(  \n                    serialize_ex(exc),  \n\t\t    parse_mode='HTML'  \n\t\t),  \n\t        reply_markup=get_update_keyboard(exc),  \n\t        description='Convert ' + exc&#91;'base_ccy'] + ' -&gt; ' + exc&#91;'ccy'],  \n\t        thumb_height=1  \n\t    )  \n        )   \n    return result\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438 \u0432\u0432\u043e\u0434\u0435 \u201c@exchangetestbost + \u043f\u0440\u043e\u0431\u0435\u043b\u201d \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/pythonru.com\/wp-content\/uploads\/2019\/06\/inlajn-rezhim-bota.png\" alt=\"\u0438\u043d\u043b\u0430\u0439\u043d \u0440\u0435\u0436\u0438\u043c \u0431\u043e\u0442\u0430\" title=\"\u0438\u043d\u043b\u0430\u0439\u043d \u0440\u0435\u0436\u0438\u043c \u0431\u043e\u0442\u0430\"\/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043d\u0430\u0431\u0440\u0430\u0442\u044c usd, \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u0442\u0441\u044f:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/pythonru.com\/wp-content\/uploads\/2019\/06\/inlajn-rezhim-bota-2.png\" alt=\"\u0438\u043d\u043b\u0430\u0439\u043d \u0440\u0435\u0436\u0438\u043c \u0431\u043e\u0442\u0430: \u0432\u0432\u043e\u0434 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\" title=\"\u0438\u043d\u043b\u0430\u0439\u043d \u0440\u0435\u0436\u0438\u043c \u0431\u043e\u0442\u0430: \u0432\u0432\u043e\u0434 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\"\/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/pythonru.com\/wp-content\/uploads\/2019\/06\/inlajn-rezhim-bota-3.png\" alt=\"\u0438\u043d\u043b\u0430\u0439\u043d \u0440\u0435\u0436\u0438\u043c \u0431\u043e\u0442\u0430: \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\" title=\"\u0438\u043d\u043b\u0430\u0439\u043d \u0440\u0435\u0436\u0438\u043c \u0431\u043e\u0442\u0430: \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\"\/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u041a\u043d\u043e\u043f\u043a\u0430 \u201cUpdate\u201d \u0442\u043e\u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/pythonru.com\/wp-content\/uploads\/2019\/06\/inlajn-rezhim-bota-4.png\" alt=\"\u0438\u043d\u043b\u0430\u0439\u043d \u0440\u0435\u0436\u0438\u043c \u0431\u043e\u0442\u0430: \u0440\u0430\u0431\u043e\u0442\u0430\" title=\"\u0438\u043d\u043b\u0430\u0439\u043d \u0440\u0435\u0436\u0438\u043c \u0431\u043e\u0442\u0430: \u0440\u0430\u0431\u043e\u0442\u0430\"\/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u041e\u0442\u043b\u0438\u0447\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430! \u0412\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0432\u044b\u0432\u043e\u0434\u044b\">\u0412\u044b\u0432\u043e\u0434\u044b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u043e\u0437\u0434\u0440\u0430\u0432\u043b\u044f\u0435\u043c! \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435, \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u043e\u0442\u0430 \u0434\u043b\u044f Telegram, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0443\u044e \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0443, \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c. \u041c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0445\u043b\u043e\u043f\u0430\u0442\u044c \u0441\u0435\u0431\u044f \u043f\u043e \u0441\u043f\u0438\u043d\u0435 \u0438 \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0442\u043e\u0441\u0442 \u0437\u0430 \u043d\u043e\u0432\u043e\u0433\u043e \u0431\u043e\u0442\u0430.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043e:&nbsp;12.06.2020 \u042d\u0442\u043e \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u0431\u043e\u0442\u0430 \u0434\u043b\u044f Telegram. \u0411\u043e\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043a\u0443\u0440\u0441\u044b \u0432\u0430\u043b\u044e\u0442, \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u0435\u0436\u0434\u0443 \u043a\u0443\u0440\u0441\u043e\u043c \u0440\u0430\u043d\u044c\u0448\u0435 \u0438 \u0441\u0435\u0439\u0447\u0430\u0441, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[66],"tags":[],"class_list":["post-2138","page","type-page","status-publish","hentry","category-python"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/pages\/2138","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/comments?post=2138"}],"version-history":[{"count":0,"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/pages\/2138\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/media?parent=2138"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/categories?post=2138"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/tags?post=2138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}