{"id":221251,"date":"2014-04-29T12:14:03","date_gmt":"2014-04-29T08:14:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=221251"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=221251","title":{"rendered":"<span class=\"post_title\">\u0410\u043d\u0430\u043b\u0438\u0437 \u0434\u0440\u0443\u0436\u0435\u0441\u043a\u0438\u0445 \u0441\u0432\u044f\u0437\u0435\u0439 VK \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Python<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0421\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c <a href=\"http:\/\/habrahabr.ru\/post\/216831\/\">\u0441\u0442\u0430\u0442\u044c\u044f<\/a> \u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0440\u0443\u0436\u0435\u0441\u043a\u0438\u0445 \u0441\u0432\u044f\u0437\u0435\u0439 \u0432 \u0412\u041a\u043e\u043d\u0442\u0430\u043a\u0442\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Wolfram Mathematica. \u0418\u0434\u0435\u044f \u043c\u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c, \u0438, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0433\u0440\u0430\u0444, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Python \u0438 <a href=\"https:\/\/github.com\/mbostock\/d3\">d3<\/a>. \u0412\u043e\u0442, \u0447\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435! \u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u0434\u0430, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044f \u0441\u0430\u043c\u044b\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u043d\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u0440\u0435\u0442\u0435\u0440\u043f\u0438\u0442 \u0435\u0449\u0435 \u043d\u0435 \u043e\u0434\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0432 \u0441\u0432\u043e\u0435\u0439 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u0435. \u0417\u0430\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u0439\u0442\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043d\u0430 <a href=\"https:\/\/github.com\/stleon\/vk_friends\">GitHub<\/a>.<\/p>\n<p>  \u0420\u0430\u0437\u043e\u0431\u044c\u0435\u043c \u0437\u0430\u0434\u0430\u0447\u0443 \u043f\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c:  <\/p>\n<ul>\n<li>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/li>\n<li>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/li>\n<li>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0440\u0430\u0444\u0430. <\/li>\n<\/ul>\n<p>  \u0427\u0442\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f:  <\/p>\n<ul>\n<li>Python 3.4<\/li>\n<li><a href=\"https:\/\/github.com\/kennethreitz\/requests\">requests<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/mbostock\/d3\">d3<\/a><\/li>\n<li>Mozilla FireFox, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 Chrome \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c XMLHttpRequest \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 (\u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c <i>python -m http.server 8000<\/i>)<\/li>\n<\/ul>\n<p>  <\/p>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h4>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a API \u0412\u041a\u043e\u043d\u0442\u0430\u043a\u0442\u0435, \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c<a href=\"https:\/\/vk.com\/dev\/standalone\"> Standalone-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/a>, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u043c\u0435\u0442\u043e\u0434\u044b API, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0434\u0430\u043b\u0435\u0435. \u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/vk.com\/editapp?act=create\">\u0437\u0434\u0435\u0441\u044c<\/a> \u2014 \u0432\u044b\u0431\u0435\u0440\u0435\u043c <b>Standalone-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/b>. \u041d\u0430\u0441 \u043f\u043e\u043f\u0440\u043e\u0441\u044f\u0442 \u0432\u0432\u0435\u0441\u0442\u0438 \u043a\u043e\u0434-\u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f, \u0432\u044b\u0441\u043b\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0439, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043c\u044b \u043f\u043e\u043f\u0430\u0434\u0435\u043c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c. \u041d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0435 <b>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438<\/b> \u043d\u0430\u043c \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f <b>ID \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/b> \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f <b>access_token<\/b>.<br \/>  \u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u042d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 3\u0445 \u044d\u0442\u0430\u043f\u043e\u0432.<\/p>\n<h5>\u0410\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u0412\u041a\u043e\u043d\u0442\u0430\u043a\u0442\u0435<\/h5>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c url, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0435:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"\/\/habrastorage.org\/files\/1ba\/c2c\/851\/1bac2c851f154426a05a9f9dca34211c.png\"\/><\/div>\n<p>  <\/p>\n<pre><code class=\"bash\">https:\/\/oauth.vk.com\/authorize?client_id=ID\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f&scope=friends&redirect_uri=https:\/\/oauth.vk.com\/blank.html&display=page&v=5.21&response_type=token <\/code><\/pre>\n<p>  \u0426\u0438\u0442\u0438\u0440\u0443\u044f <a href=\"https:\/\/vk.com\/dev\/auth_mobile\">vk.com\/dev\/auth_mobile<\/a>:  <\/p>\n<blockquote><p>APP_ID \u2013 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0412\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f; <br \/>  PERMISSIONS \u2013 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u043f\u0440\u0430\u0432\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f; <br \/>  DISPLAY \u2013 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u043e\u043a\u043d\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f: page, popup \u0438 mobile. <br \/>  REDIRECT_URI \u2013 \u0430\u0434\u0440\u0435\u0441, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d access_token. <br \/>  API_VERSION \u2013 \u0432\u0435\u0440\u0441\u0438\u044f API, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0412\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435. <\/p><\/blockquote>\n<p>  \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 PERMISSIONS \u2014 \u044d\u0442\u043e \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0434\u0440\u0443\u0437\u044c\u044f\u043c. \u0415\u0441\u043b\u0438 \u0430\u0434\u0440\u0435\u0441 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u043d\u0430\u043c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0430\u0442 \u0432\u0432\u0435\u0441\u0442\u0438 \u043b\u043e\u0433\u0438\u043d \u0438 \u043f\u0430\u0440\u043e\u043b\u044c.<\/p>\n<h5>\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0432\u043e\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u043c<\/h5>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438:  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"\/\/habrastorage.org\/files\/919\/c3a\/53e\/919c3a53e0f94ffab872504ba2f1b3e7.png\"\/><\/div>\n<p>  <\/p>\n<h5>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 access_token<\/h5>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u043d\u0430 REDIRECT_URI. \u041d\u0443\u0436\u043d\u0430\u044f \u043d\u0430\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0432 \u0441\u0441\u044b\u043b\u043a\u0435.  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"\/\/habrastorage.org\/files\/967\/e3b\/d3f\/967e3bd3f7dd49a8bb08ce9a7c4c8914.png\"\/><\/div>\n<p>  <\/p>\n<pre><code class=\"bash\">https:\/\/oauth.vk.com\/blank.html#access_token=ACCESS_TOKEN&expires_in=86400&user_id=USER_ID <\/code><\/pre>\n<p>  \u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b <b>settings.py<\/b>, \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0442\u0443\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 <b>access_token<\/b> \u0438 <b>user_id<\/b>. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a API \u0412\u041a\u043e\u043d\u0442\u0430\u043a\u0442\u0435.<\/p>\n<h4>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0446\u0435\u043b\u0438. <\/p>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0443\u0436\u043d\u0430 \u0445\u043e\u0442\u044c \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e\u0431 id \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0440\u043e\u0438\u0442\u044c\u0441\u044f \u0433\u0440\u0430\u0444, \u043d\u0430\u043c \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f <b><a href=\"https:\/\/vk.com\/dev\/users.get\">users.get<\/a><\/b>. \u041e\u043d \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043a\u0430\u043a \u043e\u0434\u0438\u043d id, \u0442\u0430\u043a \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e, \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u043b\u0435\u0439, \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0430\u0434\u0435\u0436, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u043b\u043e\u043d\u044f\u0442\u044c\u0441\u044f \u0444\u0430\u043c\u0438\u043b\u0438\u044f \u0438 \u0438\u043c\u044f. \u041c\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 <i>base_info()<\/i> \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a id \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435 \u0441 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0435\u0439. <\/p>\n<pre><code class=\"python\">def base_info(self, ids): \t\t&quot;&quot;&quot;read https:\/\/vk.com\/dev\/users.get&quot;&quot;&quot; \t\tr = requests.get(self.request_url('users.get', 'user_ids=%s&fields=photo' % (','.join(map(str, ids))))).json() \t\tif 'error' in r.keys(): \t\t\traise VkException('Error message: %s. Error code: %s' % (r['error']['error_msg'], r['error']['error_code'])) \t\tr = r['response'] \t\t# \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0435\u0441\u043b\u0438 id \u0438\u0437 settings.py \u043d\u0435 \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d \t\tif 'deactivated' in r[0].keys(): \t\t\traise VkException(&quot;User deactivated&quot;) \t\treturn r <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u0430\u0436\u043d\u043e \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0437\u0430\u0445\u043e\u0447\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u043d\u0435\u0433\u043e id \u0438\u0437 <b>friends.getMutual<\/b>, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u044f \u043d\u0430 \u0441\u0432\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041e\u0431 \u044d\u0442\u043e\u043c \u043f\u043e\u0437\u0436\u0435. <br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0434\u0440\u0443\u0437\u044c\u044f\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0432 \u0447\u0435\u043c \u043d\u0430\u043c \u0438 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 <b><a href=\"https:\/\/vk.com\/dev\/friends.get\">friends.get<\/a><\/b>. \u0418\u0437 \u0432\u0441\u0435\u0445 \u0435\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <i>user_id<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043d\u0430\u0448\u0435\u043c <b>setting.py<\/b> \u0438 <i>fields<\/i>. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u044f\u043c\u0438 \u0431\u0443\u0434\u0443\u0442 id \u0434\u0440\u0443\u0437\u0435\u0439, \u0438\u0445 \u0438\u043c\u0435\u043d\u0430, \u0444\u0430\u043c\u0438\u043b\u0438\u0438 \u0438 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438. \u0412\u0435\u0434\u044c \u0445\u043e\u0447\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0432 \u0443\u0437\u043b\u0430\u0445 \u0431\u044b\u043b\u0438 \u043c\u0438\u043d\u0438\u0430\u0442\u044e\u0440\u044b \u0438\u0445 \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0439. <\/p>\n<pre><code class=\"python\">def friends(self, id): \t\t&quot;&quot;&quot; \t\tread https:\/\/vk.com\/dev\/friends.get \t\t\u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \t\t&quot;&quot;&quot; \t\tr = requests.get(self.request_url('friends.get', \t\t\t\t'user_id=%s&fields=uid,first_name,last_name,photo' % id)).json()['response'] \t\t#self.count_friends = r['count'] \t\treturn {item['id']: item for item in r['items']} <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435. <br \/>  \u0421\u043f\u0438\u0441\u043e\u043a id \u043e\u0431\u0449\u0438\u0445 \u0434\u0440\u0443\u0437\u0435\u0439 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 <b><a href=\"https:\/\/vk.com\/dev\/friends.getMutual\">friends.getMutual<\/a><\/b>. \u042d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e id, \u0430 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f <b>friends.get<\/b>. \u041d\u043e \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0430\u043c \u043b\u0438\u0448\u043d\u044e\u044e \u0441\u043e\u0442\u043d\u044e-\u0434\u0440\u0443\u0433\u0443\u044e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <b>users.get<\/b>. <br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c\u0441\u044f, \u043a\u0430\u043a \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <b>friends.getMutual<\/b>. \u0415\u0441\u043b\u0438 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f N-\u0434\u0440\u0443\u0437\u0435\u0439, \u0442\u043e \u043d\u0430\u0434\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c N-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0434\u0440\u0443\u0433\u0443 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0431\u0449\u0438\u0445 \u0434\u0440\u0443\u0437\u0435\u0439. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0443 \u043d\u0430\u0441 \u0431\u044b\u043b\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. <br \/>  \u0418 \u0442\u0443\u0442 \u043d\u0430\u043c \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f <b><a href=\"https:\/\/vk.com\/pages.php?o=-1&amp;p=execute\">execute<\/a><\/b>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u043e\u0432. \u0423 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <i>code<\/i>, \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0434\u043e 25 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0439 \u043a \u043c\u0435\u0442\u043e\u0434\u0430\u043c API. <br \/>  \u0422\u043e \u0435\u0441\u0442\u044c \u0432 \u0438\u0442\u043e\u0433\u0435 \u043a\u043e\u0434 \u0432 <b>VKScript<\/b> \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0438\u043c:<\/p>\n<pre><code class=\"javascript\">return { \u201cid&quot;: API.friends.getMutual({&quot;source_uid&quot;:source, &quot;target_uid&quot;:target}), ... }; <\/code><\/pre>\n<p>  \u041d\u0430\u0439\u0434\u0438\u0442\u0435\u0441\u044c \u0442\u0435, \u043a\u0442\u043e \u043d\u0430\u043f\u0438\u0448\u0435\u0442, \u043a\u0430\u043a \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434, \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u0441\u0435 \u0432\u0440\u0435\u043c\u044f<i> API.friends.getMutual<\/i>.<br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0430\u0440\u0442\u0438\u044f\u043c\u0438 id \u0434\u0440\u0443\u0437\u0435\u0439 \u043f\u043e 25 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439. <br \/>  \u0410 \u0432\u0435\u0434\u044c \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e for \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0430 \u0432 <b>friends.getMutual<\/b>, \u0430 \u043f\u043e\u0442\u043e\u043c \u0435\u0449\u0435 \u0443\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 <b>users.get<\/b>. <br \/>  \u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u0433\u0434\u0435 \u0443\u0436\u0435 \u0432\u043c\u0435\u0441\u0442\u043e id \u0434\u0440\u0443\u0433\u0430 \u0438 \u0441\u043f\u0438\u0441\u043a\u0430 id \u0432\u0430\u0448\u0438\u0445 \u043e\u0431\u0449\u0438\u0445 \u0434\u0440\u0443\u0437\u0435\u0439, \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0438\u0437 <b>friends.get<\/b>. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043d\u0435\u0447\u0442\u043e \u0432\u0440\u043e\u0434\u0435:<\/p>\n<pre><code class=\"python\">[({\u0412\u0430\u0448 \u0434\u0440\u0443\u0433}, [{\u043e\u0431\u0449\u0438\u0439 \u0434\u0440\u0443\u0433}, {\u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043e\u0431\u0449\u0438\u0439 \u0434\u0440\u0443\u0433}]),({\u0412\u0430\u0448\u0430 \u043f\u043e\u0434\u0440\u0443\u0433\u0430}, None)] <\/code><\/pre>\n<p>  \u0412 \u0441\u043b\u043e\u0432\u0430\u0440\u044f\u0445 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f id, \u0438\u043c\u044f, \u0444\u0430\u043c\u0438\u043b\u0438\u044f, \u0444\u043e\u0442\u043e, \u0432 \u0441\u043f\u0438\u0441\u043a\u0430\u0445 \u2014 \u0441\u043b\u043e\u0432\u0430\u0440\u0438 \u043e\u0431\u0449\u0438\u0445 \u0434\u0440\u0443\u0437\u0435\u0439, \u0435\u0441\u043b\u0438 \u043e\u0431\u0449\u0438\u0445 \u0434\u0440\u0443\u0437\u0435\u0439 \u043d\u0435\u0442, \u0442\u043e None. \u041a\u043e\u0440\u0442\u0435\u0436\u0430\u043c\u0438 \u0432\u0441\u0435 \u044d\u0442\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f. <\/p>\n<pre><code class=\"python\">def common_friends(self): \t\t&quot;&quot;&quot; \t\tread https:\/\/vk.com\/dev\/friends.getMutual and read https:\/\/vk.com\/dev\/execute \t\t\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u043a\u043e\u0440\u0442\u0435\u0436\u0438 \u0441 \u0438\u043d\u0444\u043e\u0439 \u043e \u0446\u0435\u043b\u0438 \u0438 \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u043e\u0431\u0449\u0438\u0445 \u0434\u0440\u0443\u0437\u0435\u0439 \u0441 \u0438\u043d\u0444\u043e\u0439 \t\t&quot;&quot;&quot; \t\tdef parts(lst, n=25): \t\t\t&quot;&quot;&quot; \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0430 \u0447\u0430\u0441\u0442\u0438 - \u043f\u043e 25 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 &quot;&quot;&quot; \t\t\treturn [lst[i:i + n] for i in iter(range(0, len(lst), n))]  \t\tresult = [] \t\tfor i in parts(list(self.all_friends.keys())): \t\t\t# \u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c code (\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 execute) \t\t\tcode = 'return {' \t\t\tfor id in i: \t\t\t\tcode = '%s%s' % (code, '&quot;%s&quot;: API.friends.getMutual({&quot;source_uid&quot;:%s, &quot;target_uid&quot;:%s}),' % (id,  \t\t\t\t\t\t\t\tself.my_id, id)) \t\t\tcode = '%s%s' % (code, '};')  \t\t\tfor key, val in requests.get(self.request_url('execute', 'code=%s' % code)).json()['response'].items(): \t\t\t\tif int(key) in list(self.all_friends.keys()): \t\t\t\t\t# \u0431\u0435\u0440\u0435\u043c \u0438\u043d\u0444\u0443 \u0438\u0437 \u0443\u0436\u0435 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \t\t\t\t\tresult.append((self.all_friends[int(key)], [self.all_friends[int(i)] for i in val] if val else None))  \t\treturn result <\/code><\/pre>\n<p>  \u0418\u0442\u0430\u043a, \u0435\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u0440\u0443\u0437\u0435\u0439 \u0438 \u043e\u0431\u0449\u0438\u0445 \u0441 \u043d\u0438\u043c\u0438 \u0434\u0440\u0443\u0437\u0435\u0439, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c: <\/p>\n<pre><code class=\"bash\">python main.py <\/code><\/pre>\n<p>  <\/p>\n<h4>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0440\u0430\u0444\u0430<\/h4>\n<p>  \u0412\u044b\u0431\u043e\u0440 \u043f\u0430\u043b \u043d\u0430 <a href=\"https:\/\/github.com\/mbostock\/d3\/wiki\/Gallery\">d3<\/a>, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 <a href=\"http:\/\/bl.ocks.org\/mbostock\/4600693\">Curved Links<\/a>. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0434\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c <i>json<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f:<\/p>\n<pre><code class=\"javascript\">{  &quot;nodes&quot;: [          {&quot;name&quot;:&quot;Myriel&quot;,&quot;group&quot;:1, &quot;photo&quot;: &quot;path&quot;},          {&quot;name&quot;:&quot;Napoleon&quot;,&quot;group&quot;:1, &quot;photo&quot;: &quot;path&quot;},          {&quot;name&quot;:&quot;Mlle.Baptistine&quot;,&quot;group&quot;:1, &quot;photo&quot;: &quot;path&quot;}          ],  &quot;links&quot;:[          {&quot;source&quot;:1,&quot;target&quot;:0,&quot;value&quot;:1},          {&quot;source&quot;:2,&quot;target&quot;:0,&quot;value&quot;:8}          ]  } <\/code><\/pre>\n<p>  \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0438\u0434\u043e\u0438\u0437\u043c\u0435\u043d\u044f\u044f <b>index.html<\/b>, \u0443\u0437\u043b\u0430\u043c\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \u0434\u0440\u0443\u0437\u0435\u0439. <\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444:<\/p>\n<pre><code class=\"bash\">python 2d3.py <\/code><\/pre>\n<p>  \u0412 \u043f\u0430\u043f\u043a\u0435 web \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0444\u0430\u0439\u043b <b>miserables.json<\/b>. \u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c <b>index.html<\/b> \u0432 Mozilla FireFox \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <i>python -m http.server 8000<\/i> \u0438 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0432 Chrome. <\/p>\n<p>  \u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u0434\u0442\u043e\u0440\u043c\u0430\u0436\u0438\u0432\u0430\u0435\u0442 \u043f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0440\u0443\u0437\u0435\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u0431\u0443\u0434\u0443\u0449\u0435\u0435 \u044f \u0434\u0443\u043c\u0430\u044e \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 WebGL. <\/p>\n<p>  \u0422\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0433\u0440\u0430\u0444 \u0434\u0440\u0443\u0436\u0435\u0441\u043a\u0438\u0445 \u0441\u0432\u044f\u0437\u0435\u0439 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437 \u043c\u043e\u0438\u0445 \u0434\u0440\u0443\u0437\u0435\u0439. \u0421\u0432\u044f\u0437\u0438 \u2014 \u044d\u0442\u043e \u0432\u0441\u0435.   <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"\/\/habrastorage.org\/files\/208\/be0\/6e4\/208be06e484b419faae2d362b5f068e6.png\"\/><\/div>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043c\u043d\u0435 \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0443 \u043a\u043e\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u0435\u0435. <\/p>\n<p>  \u0412 <a href=\"http:\/\/habrahabr.ru\/post\/216831\/\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u0435\u043d\u044f \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0438\u043b\u0430, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e:  <\/p>\n<blockquote><p>\u041d\u0430 \u043c\u043e\u0438\u0445 333 \u0434\u0440\u0443\u0437\u044c\u044f\u0445 \u044d\u0442\u043e \u0437\u0430\u043d\u044f\u043b\u043e 119 \u0441\u0435\u043a\u0443\u043d\u0434.<\/p><\/blockquote>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"\/\/habrastorage.org\/files\/675\/4a9\/524\/6754a9524278491a9080d8e7bfe2810c.png\"\/><\/div>\n<p>  \u041d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u0443 <a href=\"http:\/\/habrahabr.ru\/users\/himura\/\" class=\"user_link\">Himura<\/a> \u0432 \u0412\u041a\u043e\u043d\u0442\u0430\u043a\u0442\u0435 \u0431\u044b\u043b 321 \u0434\u0440\u0443\u0433. \u0423 \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u0437\u0430\u043d\u044f\u043b\u043e 9 \u0441\u0435\u043a\u0443\u043d\u0434 (\u0440\u0430\u0431\u043e\u0442\u0430 \u0432\u0441\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u0430 \u043d\u0435 \u043e\u0434\u043d\u043e\u0433\u043e <b>friends.getMutual<\/b>).<\/p>\n<h4>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0412\u0441\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u0430\u0445 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u0449\u0435\u0434\u0440\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0412\u041a\u043e\u043d\u0442\u0430\u043a\u0442\u0435, \u043e\u0434\u043d\u0430\u043a\u043e \u043c\u043d\u043e\u0439 \u0431\u044b\u043b\u0430 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0430 \u043f\u0430\u0440\u0430 \u043e\u0448\u0438\u0431\u043e\u043a: \u043d\u0435 \u0431\u044b\u043b\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0441 \u043a\u043e\u0434\u043e\u043c 15 (<i>&#8216;error_msg&#8217;: &#8216;Access denied: user deactivated&#8217;, &#8216;error_code&#8217;: 15<\/i>), \u0434\u043e\u0433\u0430\u0434\u0430\u0442\u044c\u0441\u044f \u043c\u043e\u0436\u043d\u043e, \u0447\u0442\u043e \u043e\u043d\u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0438 <i>uid<\/i> \u0432\u043c\u0435\u0441\u0442\u043e <i>user_id<\/i> \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043a \u043c\u0435\u0442\u043e\u0434\u0443 friends.get. \u0421\u043f\u0443\u0441\u0442\u044f 2 \u0434\u043d\u044f:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\"  src=\"\/\/habrastorage.org\/files\/ecb\/30d\/1e9\/ecb30d1e95294b99bf81d35731d53e06.png\"\/><\/div>\n<p>  \u041a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c \u0432\u043d\u0430\u0447\u0430\u043b\u0435, \u043f\u0440\u043e\u0435\u043a\u0442 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 <a href=\"https:\/\/github.com\/stleon\/vk_friends\">GitHub<\/a>, \u0431\u0443\u0434\u0443 \u0440\u0430\u0434, \u0435\u0441\u043b\u0438 \u043e\u043d \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0435\u0449\u0451 \u043a\u043e\u043c\u0443-\u0442\u043e \u0438 \u044f \u043f\u043e\u043b\u0443\u0447\u0443 \u043c\u043d\u043e\u0433\u043e \u0432\u043a\u0443\u0441\u043d\u044b\u0445 \u043f\u0443\u043b\u043b \u0440\u0435\u043a\u0432\u0435\u0441\u0442\u043e\u0432\u2026 \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/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=\"http:\/\/habrahabr.ru\/post\/221251\/\"> http:\/\/habrahabr.ru\/post\/221251\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0421\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c <a href=\"http:\/\/habrahabr.ru\/post\/216831\/\">\u0441\u0442\u0430\u0442\u044c\u044f<\/a> \u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0440\u0443\u0436\u0435\u0441\u043a\u0438\u0445 \u0441\u0432\u044f\u0437\u0435\u0439 \u0432 \u0412\u041a\u043e\u043d\u0442\u0430\u043a\u0442\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Wolfram Mathematica. \u0418\u0434\u0435\u044f \u043c\u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u0430\u0441\u044c, \u0438, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0433\u0440\u0430\u0444, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Python \u0438 <a href=\"https:\/\/github.com\/mbostock\/d3\">d3<\/a>. \u0412\u043e\u0442, \u0447\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c.  <\/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-221251","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/221251","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=221251"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/221251\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=221251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=221251"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=221251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}