{"id":299887,"date":"2020-03-09T21:00:15","date_gmt":"2020-03-09T21:00:15","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=299887"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=299887","title":{"rendered":"\u041e\u0431\u0445\u043e\u0434\u0438\u043c \u0437\u0430\u043f\u0440\u0435\u0442 messages API \u0412\u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0435 \u0447\u0435\u0440\u0435\u0437 Python"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/491554\/\">\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440. \u0412 \u0441\u0432\u043e\u0435\u0439 <a href=\"https:\/\/habr.com\/ru\/post\/491276\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043c\u0435\u0442\u043e\u0434\u0430\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0430 messages \u0447\u0435\u0440\u0435\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u043b\u043e \u043b\u0438\u0448\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u0412\u041a. \u041c\u043d\u043e\u0433\u0438\u0435 \u0442\u043e\u0433\u0434\u0430 \u0437\u0430\u044f\u0432\u0438\u043b\u0438, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0433\u0440\u043e\u0437\u043e\u0439 \u043b\u0438\u0447\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0430 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043a\u0430\u0447\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u2014 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b. \u0422\u0430\u043a\u0436\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043c\u043d\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 <a href=\"http:\/\/www.npmjs.com\/package\/vk-io\" rel=\"nofollow\">node.js \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u043b\u043e\u0433\u0438\u043d\u0443\/\u043f\u0430\u0440\u043e\u043b\u044e \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a API \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043f\u0440\u0438\u0442\u0432\u043e\u0440\u044f\u044f\u0441\u044c \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c.  <\/p>\n<blockquote>\n<h1>\u0414\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440:<\/h1>\n<p>  \u0421\u0442\u0430\u0442\u044c\u044f \u0438 \u0432\u0435\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0446\u0435\u043b\u044f\u0445 \u0438 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0434\u043b\u044f \u043d\u0435\u0437\u0430\u043a\u043e\u043d\u043d\u043e\u0439 \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0410\u0432\u0442\u043e\u0440 \u043d\u0435 \u043f\u0440\u0438\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0430\u0441 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u043b\u0438\u0431\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0437\u0434\u0435\u0441\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0438 \u043d\u0435 \u043d\u0435\u0441\u0451\u0442 \u0437\u0430 \u043d\u0438\u0445 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438.<\/p><\/blockquote>\n<p>  \u041d\u043e \u043d\u0435 \u0432\u0441\u0435 \u043b\u044e\u0434\u0438 \u0437\u043d\u0430\u043a\u043e\u043c\u044b c javascript \u0438 node.js, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0438 \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043d\u0430 python, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u0438\u0435, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0443\u044e \u0447\u0435\u0440\u0435\u0437 \u00ab\u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b\u00bb \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b messages API. \u0421\u0440\u0430\u0437\u0443 \u043f\u0440\u043e\u0448\u0443 \u043d\u0435 \u0437\u043b\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043c\u0435\u043d\u044f \u0432 \u043c\u0435\u0441\u0442\u0430\u0445, \u0433\u0434\u0435 \u044f \u0431\u0443\u0434\u0443 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u043f\u0440\u043e\u0448\u043b\u043e\u0433\u043e \u00ab\u0432\u044b\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f\u00bb, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044f \u0445\u043e\u0447\u0443 \u043e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u0432 \u0432\u0438\u0434\u0435 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u041a\u0430\u043a \u044d\u0442\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f?<\/h2>\n<p>  \u0421\u0430\u043c\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f <a href=\"https:\/\/github.com\/Aragroth\/vk_messages\" rel=\"nofollow\">\u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 github-a<\/a> (\u0442\u0430\u043c \u0436\u0435, \u0432 \u043f\u0430\u043f\u043a\u0435 examples, \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0441\u043a\u0440\u0438\u043f\u0442 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0437 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438). \u0427\u0442\u043e\u0431\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0451 \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:  <\/p>\n<blockquote><p>pip install vk-messages<\/p><\/blockquote>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0435\u0433\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440, \u0443\u043a\u0430\u0437\u0430\u0432 \u043b\u043e\u0433\u0438\u043d, \u043f\u0430\u0440\u043e\u043b\u044c, \u043a\u0430\u043a\u043e\u0439 \u0432\u0438\u0434 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e, \u043a\u0443\u0434\u0430 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u0443\u043a\u0438-\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u042d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0441 \u0434\u0432\u0443\u0445\u0444\u0430\u043a\u0442\u043e\u0440\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u043c \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u043e\u0434 \u0438\u0437 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"python\">from vk_messages import MessagesAPI  login, password = 'login', 'password'                                 messages = MessagesAPI(login=login, password=password,                                 two_factor=True, cookies_save_path='sessions\/') <\/code><\/pre>\n<p>  \u0418 \u043f\u043e \u0441\u0443\u0442\u0438, \u043d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0451. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0435 \u043d\u0430\u0441 \u043c\u0435\u0442\u043e\u0434\u044b. \u0425\u043e\u0447\u0443 \u0441\u0440\u0430\u0437\u0443 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u044e\u0431\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 \u0438\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u0434\u0430\u0436\u0435 \u043d\u0435 \u043e\u0442\u043d\u043e\u0441\u044f\u0449\u0438\u0439\u0441\u044f \u043a \u0440\u0430\u0437\u0434\u0435\u043b\u0443 messages:<\/p>\n<pre><code class=\"python\">history = messages.method('messages.getHistory', user_id='1234567', count=5) <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/github.com\/python273\/vk_api\" rel=\"nofollow\">vk_api<\/a> \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \u0441 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 (\u043a\u043e\u0434 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0443 \u043d\u0438\u0445 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 examples), \u0430 \u0447\u0435\u0440\u0435\u0437 vk_messages \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u044d\u0442\u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043a \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044e:<\/p>\n<pre><code class=\"python\">from vk_messages.utils import get_random  messages.method('messages.send', user_id=peer_id, message='Hello',             attachment='photo123456_7891011', random_id=get_random()) <\/code><\/pre>\n<p>  \u0418\u0437 \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u0441\u0442\u0432\u0430 \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0430\u043f\u043a\u0435 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043f\u043e\u0434\u043f\u0430\u043f\u043a\u0438 \u043b\u044e\u0434\u0435\u0439, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u0431\u0449\u0430\u043b\u0441\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a, \u0438 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u0435 url-\u044b \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0439. \u041a \u043c\u043e\u0435\u043c\u0443 \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043a\u0430\u043a \u0447\u0430\u0441\u044b, \u0438 \u043b\u0438\u0448\u043d\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u043d\u0435 \u0431\u044b\u043b\u043e:<\/p>\n<pre><code class=\"python\">from vk_messages.utils import fast_parser  fast_parser(messages, path='parsing\/',                            count_conv=10, messages_deep=400, photos_deep=100)  <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0436\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438: \u0438\u043c\u0435\u044f \u043a\u0443\u043a\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043b\u044e\u0431\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f. \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u0441\u0432\u043e\u0439 \u043b\u0438\u0447\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0433\u0434\u0430 \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u043e\u0432 \u0433\u0440\u0443\u043f\u043f\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f \u0441\u043e\u0441\u0442\u043e\u044e, \u043c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0443\u044e \u0438\u0437 ID \u043f\u043e\u0441\u0442\u0430 \u0438 \u0435\u0433\u043e <i>\u0430\u0432\u0442\u043e\u0440\u0430<\/i>. \u041d\u043e \u0432 \u0447\u0451\u043c \u0431\u044b\u043b\u0430 \u0437\u0430\u0433\u0432\u043e\u0437\u0434\u043a\u0430: \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 api \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 <i>\u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b<\/i> \u0441\u0442\u0430\u0442\u044c\u044e. \u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u0441\u043d\u0438\u0444\u0444\u0435\u0440\u043e\u043c, \u044f \u0443\u0432\u0438\u0434\u0435\u043b, \u0447\u0442\u043e \u043f\u0440\u0438 \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u0438 \u043d\u0430 \u0434\u0430\u0442\u0443 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u0441\u0442\u0430 \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0418 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043e\u0431\u0451\u0440\u0442\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0433\u043e\u0434\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043b\u0438\u0448\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043f\u043e\u0441\u0442\u0430 \u0438 \u043a\u0443\u043a\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u043e\u0432. \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0438\u0436\u0435 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0445 \u0442\u0435\u0433\u043e\u0432:<\/p>\n<pre><code class=\"python\">def get_creators(post, cookies):     group = -int(post.split('_')[0])     response = requests.post('https:\/\/vk.com\/al_page.php', cookies=cookies,                data=f&quot;_ads_group_id={group}&amp;act=post_author_data_tt&amp;al=1&amp;raw={post}&quot;)      response_json = json.loads(response.text[4:])['payload'][1]     return response_json[0]  authors = get_creators(post='-12345_67890',                     cookies=messages.get_cookies()) print(authors)    <\/code><\/pre>\n<p>  \u041d\u043e \u0447\u0442\u043e \u0434\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u043c \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u043a\u0443\u0441\u043e\u043a \u043a\u043e\u0434\u0430? \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0412\u041a \u0437\u0430\u043a\u0440\u043e\u0435\u0442 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0441\u0432\u043e\u0435\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u043c\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043c\u043e\u0436\u0435\u043c \u0441\u0438\u043c\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u00ab\u043f\u0440\u043e\u043b\u0438\u0441\u0442\u044b\u0432\u0430\u043d\u0438\u044f\u00bb \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e API.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u0441\u043a\u0440\u044b\u0442\u044c \u0435\u0433\u043e<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">def get_attachments(attachment_type, peer_id, count, offset, cookies_final):     if attachment_type == 'photo':         session = requests.Session()         parsed = []                  response = session.post(f'https:\/\/vk.com\/wkview.php',                             data=f'act=show&amp;al=1&amp;dmcah=&amp;loc=im&amp;ref=&amp;w=history{peer_id}_photo', cookies=cookies_final)                  response_json = json.loads(response.text[4:])                  try:             last_offset = response_json['payload'][1][2]['offset']             count_all = response_json['payload'][1][2]['count']         except:             last_offset = response_json['payload'][1][0]['offset']             count_all = response_json['payload'][1][0]['count']          while (len(parsed) &lt; count + offset)  and (last_offset != count_all):             response_json = json.loads(response.text[4:])                      try:                 last_offset = response_json['payload'][1][2]['offset']             except:                 last_offset = response_json['payload'][1][0]['offset']              photos_vk =  re.findall(r'&lt;a href=&quot;\/photo(\\S*)?all=1&quot;', response_json['payload'][1][1])             mails =  re.findall(r&quot;'(\\S*)', {img: this ,&quot;, response_json['payload'][1][1])              for photo, mail in zip(photos_vk, mails):                 if len(parsed) &lt; offset:                     parsed.append(photo)                     continue                                  response = session.post(f'https:\/\/vk.com\/al_photos.php', cookies=cookies_final,                             data=f'act=show&amp;al=1&amp;al_ad=0&amp;dmcah=&amp;gid=0&amp;list={mail}&amp;module=im&amp;photo={photo}')                                  response_json = json.loads(response.text[4:])                 photo_size = list(response_json['payload'][1][3][0].items())                 photo_size.reverse()                                  for i in range(len(photo_size)):                     if 'attached_tags' in photo_size[i][0]:                         photo_size = photo_size[:i]                         break                              parsed.append(photo_size)               response = session.post(f'https:\/\/vk.com\/wkview.php', cookies=cookies_final,                     data=f'act=show&amp;al=1&amp;offset={last_offset}&amp;part=1&amp;w=history{peer_id}_photo')                  return parsed[offset + 3 : offset + 3 + count] <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043b\u0438 \u044d\u0442\u043e \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u043e? \u0414\u0430. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043b\u0438 \u044d\u0442\u043e \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435, \u0447\u0435\u043c \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 api? \u0414\u0430. \u041d\u043e \u0435\u0441\u043b\u0438 \u0412\u041a \u043e\u0442\u043d\u0438\u043c\u0443\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f\u043c, \u043c\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u0432\u044b\u0445\u043e\u0434.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u043e \u0432\u0441\u0435 \u043c\u0435\u0441\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0433\u0434\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u043e\u0448\u0438\u0431\u043a\u0438, \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f\u043c\u0438, \u043d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0430\u0439\u0434\u0451\u0442\u0435 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0435, \u0442\u043e \u043f\u0440\u043e\u0448\u0443 \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c \u043c\u043d\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c.  <\/p>\n<blockquote><p>\u0414\u0443\u043c\u0430\u044e, \u044d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u043d\u043e \u044f \u0432\u0441\u0451-\u0442\u0430\u043a\u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u0430\u0441 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u0435\u0435 \u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u043a\u0443\u043a\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0442\u043e\u0439 \u0436\u0435 \u043f\u0430\u043f\u043a\u0435, \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u044b\u043b \u0437\u0430\u043f\u0443\u0449\u0435\u043d \u0441\u043a\u0440\u0438\u043f\u0442, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0435 \u0431\u0440\u043e\u0441\u0430\u0439\u0442\u0435 \u0438\u0445 \u0433\u0434\u0435 \u043f\u043e\u043f\u0430\u043b\u043e, \u0432\u0435\u0434\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438\u0445 \u043c\u0435\u0441\u0442\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f. \u041a\u043e\u043d\u0447\u0435\u043d\u043e, \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u044d\u0442\u0438 \u043a\u0443\u043a\u0438 \u0441\u0430\u043c\u0438 \u043f\u043e \u0441\u0435\u0431\u0435 \u0441\u0442\u0430\u043d\u0443\u0442 \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c\u0438, \u043d\u043e \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u043e\u0439 \u0443\u0433\u0440\u043e\u0437\u043e\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430.  <\/p><\/blockquote>\n<h2>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442?<\/h2>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u0432\u043a\u0440\u0430\u0442\u0446\u0435 \u043f\u0440\u043e\u0439\u0434\u0443\u0441\u044c \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u043f\u0443\u043d\u043a\u0442\u0430\u043c. \u041f\u0440\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0435\u043b\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u0435 request \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0441\u0438\u043c\u0443\u043b\u0438\u0440\u0443\u044e\u0449\u0438\u0435 \u0432\u0445\u043e\u0434 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043b\u0438\u0448\u044c \u0441\u043b\u0435\u0433\u043a\u0430 \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0438\u0434\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u0430 \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0432\u0445\u043e\u0434\u0430 \u043a\u0443\u043a\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 pickle \u0444\u0430\u0439\u043b. \u041f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043a api \u0447\u0435\u0440\u0435\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e, \u043a\u043e \u0432\u0441\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u00abparam_\u00bb, \u0442\u043e \u0435\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 offset \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u0441\u044f \u0432 param_offset. \u0422\u0430\u043a\u0436\u0435 \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f hash-\u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0432 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0435 data-hash \u0442\u044d\u0433\u0430 \u043a\u043d\u043e\u043f\u043a\u0438 \u00ab\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c\u00bb. \u041d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f \u0437\u0430\u043c\u0435\u0442\u0438\u043b, \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e.<\/p>\n<p>  \u0422\u0430\u043a \u0436\u0435 \u043e\u0442\u043c\u0435\u0447\u0443 \u043e\u0434\u0438\u043d \u0432\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442: \u043f\u0430\u0440\u043e\u043b\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0435 ANSI, \u0433\u0434\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0437\u043d\u0430\u043a\u043e\u043c &quot;%&quot;, \u0438 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u043a\u043e\u0433\u043e \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u0434\u043b\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043b\u0438\u043d\u0443\u043a\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0432\u0435\u0434\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f \u043f\u043e\u043c\u043d\u044e, \u044d\u0442\u0430 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0435 \u0432\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432 python \u043d\u0430 \u044d\u0442\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435.<\/p>\n<pre><code class=\"python\">self.password = str(password.encode('ANSI')).replace('\\\\x', '%')[2:-1] <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0441\u0442\u0430\u043b\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0435\u0441\u043b\u0438 \u044f \u043c\u0435\u043d\u044f\u043b \u043c\u0435\u0441\u0442\u0430\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0442\u043e \u0441\u043a\u0440\u0438\u043f\u0442 \u043c\u043e\u0433 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u0432 10 \u0440\u0430\u0437 \u043c\u0435\u043d\u044c\u0448\u0435 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0438\u043b\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0432\u0435\u0440\u043d\u0443\u0442\u044c. \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0432\u0430\u0442\u044c \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u0441\u0442\u0440\u043e\u0433\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u043a\u0430\u043a \u043e\u043d\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435, \u043d\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u043e:<\/p>\n<pre><code class=\"python\">response = session.get(f'https:\/\/vk.com\/dev\/{name}', cookies=self.cookies_final) hash_data =  re.findall(r'data-hash=&quot;(\\S*)&quot;', response.text)  soup = BeautifulSoup(response.text, features=&quot;html.parser&quot;) params = soup.findAll(&quot;div&quot;, {&quot;class&quot;: &quot;dev_const_param_name&quot;}) params = [cleanhtml(str(i)) for i in params]  payload, checker = '', 0 for param in params:    if param in kwargs:        checker += 1        payload += '&amp;{}={}'.format('param_' + \\    param, quote(str(kwargs[param]) if type(kwargs[param]) != bool else str(int(kwargs[param]))))          if checker != len(kwargs):    raise Exception_MessagesAPI('Some of the parametrs invalid', 'InvalidParameters') <\/code><\/pre>\n<p>  <\/p>\n<h2>\u0418\u0442\u043e\u0433<\/h2>\n<p>  \u0427\u0442\u043e \u0436\u0435, \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u0434\u0430\u043d\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0441\u0442\u0430\u043b\u0430 \u043f\u0435\u0440\u0432\u044b\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u00ab\u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445\u00bb \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u0440\u043e\u0448\u0443 \u043d\u0435 \u0441\u0443\u0434\u0438\u0442\u044c \u0435\u0451 \u0441\u0442\u0440\u043e\u0433\u043e. \u042f \u043f\u0440\u043e\u0441\u0442\u043e \u0445\u043e\u0442\u0435\u043b \u043f\u043e\u043c\u043e\u0447\u044c \u043b\u044e\u0434\u044f\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u0441\u044f \u0441 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u043a\u0430\u043a \u0438 \u044f: \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 messages API. \u0422\u0430\u043a\u0436\u0435 \u044f \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0447\u0443 \u043f\u043e\u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0438\u0442\u044c \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u043b\u0438 \u043c\u043d\u0435 \u0441 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u043e\u0434\u0430.<\/div>\n<p> \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\/post\/491554\/\"> https:\/\/habr.com\/ru\/post\/491554\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/491554\/\">\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440. \u0412 \u0441\u0432\u043e\u0435\u0439 <a href=\"https:\/\/habr.com\/ru\/post\/491276\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b \u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043c\u0435\u0442\u043e\u0434\u0430\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0430 messages \u0447\u0435\u0440\u0435\u0437 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u043b\u043e \u043b\u0438\u0448\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u0412\u041a. \u041c\u043d\u043e\u0433\u0438\u0435 \u0442\u043e\u0433\u0434\u0430 \u0437\u0430\u044f\u0432\u0438\u043b\u0438, \u0447\u0442\u043e \u044d\u0442\u043e \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0433\u0440\u043e\u0437\u043e\u0439 \u043b\u0438\u0447\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u0430 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u043a\u0430\u0447\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u2014 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b. \u0422\u0430\u043a\u0436\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043c\u043d\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 <a href=\"http:\/\/www.npmjs.com\/package\/vk-io\" rel=\"nofollow\">node.js \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u043b\u043e\u0433\u0438\u043d\u0443\/\u043f\u0430\u0440\u043e\u043b\u044e \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a API \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, \u043f\u0440\u0438\u0442\u0432\u043e\u0440\u044f\u044f\u0441\u044c \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c.  <\/p>\n<blockquote>\n<h1>\u0414\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440:<\/h1>\n<p>  \u0421\u0442\u0430\u0442\u044c\u044f \u0438 \u0432\u0435\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0446\u0435\u043b\u044f\u0445 \u0438 \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0434\u043b\u044f \u043d\u0435\u0437\u0430\u043a\u043e\u043d\u043d\u043e\u0439 \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0410\u0432\u0442\u043e\u0440 \u043d\u0435 \u043f\u0440\u0438\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0430\u0441 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u043b\u0438\u0431\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0437\u0434\u0435\u0441\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0438 \u043d\u0435 \u043d\u0435\u0441\u0451\u0442 \u0437\u0430 \u043d\u0438\u0445 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438.<\/p><\/blockquote>\n<p>  \u041d\u043e \u043d\u0435 \u0432\u0441\u0435 \u043b\u044e\u0434\u0438 \u0437\u043d\u0430\u043a\u043e\u043c\u044b c javascript \u0438 node.js, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0438 \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u043d\u0430 python, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u0438\u0435, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0443\u044e \u0447\u0435\u0440\u0435\u0437 \u00ab\u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b\u00bb \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b messages API. \u0421\u0440\u0430\u0437\u0443 \u043f\u0440\u043e\u0448\u0443 \u043d\u0435 \u0437\u043b\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043c\u0435\u043d\u044f \u0432 \u043c\u0435\u0441\u0442\u0430\u0445, \u0433\u0434\u0435 \u044f \u0431\u0443\u0434\u0443 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u043f\u0440\u043e\u0448\u043b\u043e\u0433\u043e \u00ab\u0432\u044b\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f\u00bb, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044f \u0445\u043e\u0447\u0443 \u043e\u0444\u043e\u0440\u043c\u0438\u0442\u044c \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u0432 \u0432\u0438\u0434\u0435 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438.  <\/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-299887","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/299887","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=299887"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/299887\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=299887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=299887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=299887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}