{"id":175079,"date":"2013-04-02T12:32:03","date_gmt":"2013-04-02T08:32:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=175079"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=175079","title":{"rendered":"<span class=\"post_title\">\u041a\u0430\u043f\u0447\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PIL \u0438\u043b\u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/b9d\/712\/ced\/b9d712ced3ad1640fa1191772928ac36.png\"\/><br \/>  \u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e. \u0412\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u043f\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043a\u0430\u043f\u0447\u0438. \u0425\u043e\u0442\u0435\u043b \u0441 \u043d\u0443\u043b\u044f \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0435, \u0442\u0430\u043a \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043f\u043e\u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0448\u043a\u0443\u0440\u0435, \u043a\u0430\u043a \u0440\u0435\u0448\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u0441\u043e \u0441\u0442\u0430\u0436\u0435\u043c, \u0434\u0443\u043c\u0430\u044e, \u0437\u0430\u043a\u0438\u0434\u0430\u044e\u0442 \u0448\u0430\u043f\u043a\u0430\u043c\u0438, \u043d\u043e, \u0431\u0443\u0434\u0443 \u043d\u0430\u0434\u0435\u0435\u0442\u0441\u044f, \u043a\u043e\u043c\u0443-\u043d\u0438\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0435\u0437\u0435\u043d, \u0445\u043e\u0442\u044f \u0431\u044b \u0442\u043e\u043b\u0438\u043a\u0430 \u0438\u0437 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0442\u0443\u0442 \u043e\u043f\u0438\u0448\u0443.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0418\u0442\u0430\u043a, \u0438\u043c\u0435\u0435\u0442\u0441\u044f Django, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0430\u043f\u0447\u0443 \u0434\u043b\u044f \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u0445 \u0446\u0435\u043b\u0435\u0439. \u041f\u043e\u043b\u043d\u044b\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443, \u043f\u0435\u0440\u0435\u0434\u0443 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043a\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443. \u0427\u0442\u043e \u0438\u0437 \u0441\u0435\u0431\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043a\u0430\u043f\u0447\u0430 \u2014 \u0448\u0435\u0441\u0442\u0438\u0437\u043d\u0430\u0447\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u043a\u0430\u0436\u0434\u0430\u044f \u0446\u0438\u0444\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0441\u0432\u043e\u0439 \u0446\u0432\u0435\u0442, \u0448\u0440\u0438\u0444\u0442, \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443, \u0433\u0443\u043b\u044f\u0442\u044c \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438 \u0438 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u0438, \u043f\u043b\u044e\u0441, \u0431\u0443\u0434\u0443\u0442 \u0433\u0443\u043b\u044f\u0442\u044c \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u044b\u0435 \u0448\u0443\u043c\u044b \u0432 \u0432\u0438\u0434\u0435 \u043f\u0430\u043b\u043e\u0447\u0435\u043a.<\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u043e, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438:  <\/p>\n<pre><code class=\"python\">from hashlib import md5 #\u043f\u043e\u0434\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043b\u044e\u0447\u0430 from PIL import Image, ImageDraw, ImageFont #\u043d\u0430\u0431\u043e\u0440 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 PIL import random #\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u0430\u043d\u0434\u043e\u043c\u0430 from StringIO import StringIO #\u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043a\u0443 <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e:  <\/p>\n<pre><code class=\"python\">def capthaGenerate(request): <\/code><\/pre>\n<p>  \u041f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u0433\u0434\u0435 \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0443\u0442 \u043b\u0435\u0436\u0430\u0442\u044c \u0448\u0440\u0438\u0444\u0442\u044b \u0444\u043e\u0440\u043c\u0430\u0442\u0430 .ttf, \u043f\u0440\u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u0430\u043f\u0447\u0438, \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u043e \u0431\u0440\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0442\u044c \u043e\u0434\u0438\u043d \u0448\u0440\u0438\u0444\u0442 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0446\u0438\u0444\u0440\u044b:  <\/p>\n<pre><code class=\"python\">path = &quot;\/nginx\/project\/files\/static\/c\/&quot; <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 PIL:  <\/p>\n<pre><code class=\"python\">im = Image.new('RGBA', (200, 50), (0, 0, 0, 0)) draw = ImageDraw.Draw(im) <\/code><\/pre>\n<p>  \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0431\u0443\u0434\u0435\u043c \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c:  <\/p>\n<pre><code class=\"python\">number = &quot;&quot; #\u0441\u044e\u0434\u0430 \u0437\u0430\u043d\u0435\u0441\u0435\u043c \u043d\u0430\u0448\u0435 \u0448\u0435\u0441\u0442\u0438\u0437\u043d\u0430\u0447\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u043a\u0430\u043f\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0432 \u043a\u043b\u044e\u0447 md5 margin_left = 0 #\u0437\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0435\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u0432 \u0441\u043b\u0435\u0432\u0430 \u0446\u0438\u0444\u0440\u0435 \u0432 \u043a\u0430\u043f\u0447\u0435 margin_top = 0 #\u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u0441\u0442\u0443\u043f \u0441\u0432\u0435\u0440\u0445\u0443 colorNUM = (&quot;0&quot;,&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;7&quot;,&quot;8&quot;,&quot;9&quot;,&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;,&quot;f&quot;) #\u0437\u0434\u0435\u0441\u044c \u043c\u044b \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043b\u0438 \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0434\u043b\u044f RGB-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435, \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0446\u0438\u043a\u043b \u0432 \u0448\u0435\u0441\u0442\u044c \u0437\u0430\u0445\u043e\u0434\u043e\u0432, \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0437\u0430\u0445\u043e\u0434\u0443 \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u0446\u0438\u0444\u0440\u0443 \u043a\u0430\u043f\u0447\u0438. \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c, \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442 \u0446\u0432\u0435\u0442 \u0446\u0438\u0444\u0440\u0435, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:  <\/p>\n<pre><code class=\"python\">font_color = &quot;#&quot;+str(random.randint(0,9)) y = 0 while (y &lt; 5): \trand = random.choice(colorNUM) \tfont_color = font_color+rand \ty = y+1 <\/code><\/pre>\n<p>  \u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f, \u0441\u043a\u0430\u0436\u0435\u043c \u0442\u0430\u043a, \u044f\u0440\u043a\u043e\u0441\u0442\u044c \u0446\u0438\u0444\u0440\u044b, \u043f\u0440\u043e\u0439\u0434\u044f\u0441\u044c \u0432 \u0444\u043e\u0442\u043e\u0448\u043e\u043f\u0435 \u043f\u043e \u043f\u0430\u043b\u0438\u0442\u0440\u0435 \u0446\u0432\u0435\u0442\u043e\u0432, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u043d\u0435\u043e\u043f\u044b\u0442\u043d\u044b\u043c \u0433\u043b\u0430\u0437\u043e\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0446\u0432\u0435\u0442\u0430, \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0441 0 \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0435 9, \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u044f\u0440\u043a\u0438\u0445 \u0446\u0432\u0435\u0442\u043e\u0432, \u0447\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0432\u0435\u0442\u043b\u044b\u0445 \u0442\u043e\u043d\u043e\u0432 \u0437\u0430\u0434\u043d\u0435\u0433\u043e \u0444\u043e\u043d\u0430, \u043f\u043e \u0441\u0435\u043c\u0443, \u0446\u0438\u0444\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u043d\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e. \u0422\u0435\u043c \u0441\u0430\u043c\u044b\u043c, \u043f\u0435\u0440\u0432\u044b\u043c \u0448\u0430\u0433\u043e\u043c \u0438\u0434\u0435\u0442 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u0435 \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 font_color \u0446\u0438\u0444\u0440\u044b 0-9. \u0414\u0430\u043b\u0435\u0435, \u0438\u0434\u0435\u0442 \u0446\u0438\u043a\u043b \u043d\u0430 5 \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0439, \u0434\u043b\u044f \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0431\u043e\u0440\u0430 \u0438\u0437 \u0441\u043b\u043e\u0432\u0430\u0440\u044f colorNUM, \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c, \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 font_color \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c &quot;#381dcd&quot;.<\/p>\n<p>  \u0421 \u0446\u0432\u0435\u0442\u043e\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438\u0441\u044c, \u043f\u043e\u0435\u0445\u0430\u043b\u0438 \u0434\u0430\u043b\u044c\u0448\u0435. \u0414\u0430\u043b\u0435\u0435, \u043c\u044b \u0440\u0438\u0441\u0443\u0435\u043c \u043b\u0438\u043d\u0438\u044e:  <\/p>\n<pre><code class=\"python\">#\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043b\u0438\u043d\u0438\u0438 rand_x11 = random.randint(0,100) rand_x12 = random.randint(100,200) rand_y11 = random.randint(0,50) rand_y12 = random.randint(0,50) #\u0440\u0438\u0441\u0443\u0435\u043c \u0441\u0430\u043c\u0443 \u043b\u0438\u043d\u0438\u044e draw.line((rand_x11, rand_y11, rand_x12, rand_y12), fill=&quot;#a9a6a6&quot;) <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u044b\u0439 \u0448\u0440\u0438\u0444\u0442 \u0434\u043b\u044f \u0446\u0438\u0444\u0440\u044b. \u042f \u0432\u044b\u0431\u0440\u0430\u043b 10 .ttf \u0448\u0440\u0438\u0444\u0442\u043e\u0432, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0445\u043e\u0440\u043e\u0448\u043e \u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0446\u0438\u0444\u0440\u044b, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0441\u0442\u0438\u043b\u044c \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u043d\u0434\u0438\u0432\u0438\u0434\u0443\u0430\u043b\u044c\u043d\u044b\u0439. \u041f\u043e\u043b\u043e\u0436\u0438\u043b \u0432\u0441\u0435 \u0432 \u043f\u0430\u043f\u043a\u0443, \u043f\u0443\u0442\u044c \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u043b \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043e\u0439 path. \u0414\u0430\u043b\u044c\u0448\u0435, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u0446\u0438\u0444\u0440\u0443 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 1-10:  <\/p>\n<pre><code class=\"python\">font_rand =str(random.randint(1,10)) <\/code><\/pre>\n<p>  \u0420\u0430\u043d\u0434\u043e\u043c\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430:  <\/p>\n<pre><code class=\"python\">fontSize_rand =random.randint(30,40) <\/code><\/pre>\n<p>  \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u0441\u0430\u043c\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0448\u0440\u0438\u0444\u0442\u0430:  <\/p>\n<pre><code class=\"python\">font = ImageFont.truetype(path+&quot;fonts\/&quot;+font_rand+&quot;.ttf&quot;, fontSize_rand) <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043a \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044e \u0446\u0438\u0444\u0440\u044b:  <\/p>\n<pre><code class=\"python\">a=str(random.randint(0,9)) #\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0446\u0438\u0444\u0440\u0443 <\/code><\/pre>\n<p>  \u0420\u0438\u0441\u0443\u0435\u043c \u0446\u0438\u0444\u0440\u0443:  <\/p>\n<pre><code class=\"python\">draw.text((margin_left,margin_top), a,fill=str(font_color),font=font) #\u041f\u0435\u0440\u0435\u0434 \u0446\u0438\u043a\u043b\u043e\u043c \u043c\u044b \u0434\u0430\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c margin_left,margin_top \u043d\u0443\u043b\u0435\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0442\u043e \u0435\u0441\u0442\u044c, \u043f\u0435\u0440\u0432\u0430\u044f \u0446\u0438\u0444\u0440\u0430 \u0443 \u043d\u0430\u0441 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u043c\u0435\u0435\u0442 \u043e\u0434\u043d\u043e \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043e\u0434\u043d\u0430\u043a\u043e, \u0442\u0430\u043a \u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u0430\u043a\u0430\u0442\u044c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0448\u0440\u0438\u0444\u0442\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0437\u043d\u044b\u043c\u0438, \u043a\u0430\u043a \u0438 \u0435\u0435 \u0440\u0430\u0437\u043c\u0435\u0440 <\/code><\/pre>\n<p>  \u0420\u0438\u0441\u0443\u0435\u043c \u0435\u0449\u0435 \u043e\u0434\u043d\u0443 \u043b\u0438\u043d\u0438\u044e \u0434\u043b\u044f \u0448\u0443\u043c\u0430:  <\/p>\n<pre><code class=\"python\">rand_x11 = random.randint(0,100) rand_x12 = random.randint(100,200) rand_y11 = random.randint(0,50) rand_y12 = random.randint(0,50) draw.line((rand_x11, rand_y11, rand_x12, rand_y12), fill=&quot;#a9a6a6&quot;) <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u0431\u0430\u0432\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u0432 \u0441\u043b\u0435\u0432\u0430 \u0438 \u0441\u0432\u0435\u0440\u0445\u0443 \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0446\u0438\u0444\u0440:  <\/p>\n<pre><code class=\"python\">margin_left = margin_left+random.randint(20,35) #\u0431\u0435\u0440\u0435\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438 \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u043c 20-35 \u043f\u0438\u043a\u0441\u0435\u043b\u0435\u0439 margin_top = random.randint(0,20) <\/code><\/pre>\n<p>  \u0412 \u043a\u043e\u043d\u0446\u0435 \u0446\u0438\u043a\u043b\u0430 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0448\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u0430\u043f\u0447\u0438 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e  <\/p>\n<pre><code class=\"python\">number = number+a <\/code><\/pre>\n<p>  \u0426\u0438\u043a\u043b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0441\u044f. \u041c\u044b \u0438\u043c\u0435\u0435\u043c \u0441 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443, \u0441 \u0434\u0440\u0443\u0433\u043e\u0439- \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438 \u0441\u0430\u043c\u0443 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443.<\/p>\n<p>  \u041e\u0431\u044a\u0432\u043b\u044f\u0435\u043c \u0441\u043e\u043b\u044c:  <\/p>\n<pre><code class=\"python\">salt = &quot;$@!SAf*$@FFVXZA_%(1512czvaRV&quot; <\/code><\/pre>\n<p>  \u0414\u0435\u043b\u0430\u043c \u043a\u043b\u044e\u0447\u0438\u043a:  <\/p>\n<pre><code class=\"python\">key = md5(str(number+salt)).hexdigest() <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u044c\u0448\u0435, \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443, \u0447\u0442\u043e\u0431 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043c\u043e\u0433 \u0435\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432 base64.<br \/>  \u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0434\u043b\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0432 \u0431\u0443\u0444\u0435\u0440:  <\/p>\n<pre><code class=\"python\">output = StringIO() <\/code><\/pre>\n<p>  \u0412\u044b\u0433\u0440\u0443\u0436\u0430\u0435\u043c:  <\/p>\n<pre><code class=\"python\">im.save(output, format=&quot;PNG&quot;) <\/code><\/pre>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u043c \u0432 base64 \u0438 \u0447\u0438\u0441\u0442\u0438\u043c \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c \u043e\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u043d\u043e\u0432\u044b\u0445 \u0441\u0442\u0440\u043e\u043a:  <\/p>\n<pre><code class=\"python\">contents = output.getvalue().encode(&quot;base64&quot;).replace(&quot;\\n&quot;, &quot;&quot;) <\/code><\/pre>\n<p>  \u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 html \u0432\u0438\u0434:  <\/p>\n<pre><code class=\"python\">img_tag = '&lt;img value=&quot;'+key+'&quot; src=&quot;data:image\/png;base64,{0}&quot;&gt;'.format(contents) <\/code><\/pre>\n<p>  \u041e\u0447\u0438\u0449\u0430\u0435\u043c \u0431\u0443\u0444\u0435\u0440:  <\/p>\n<pre><code class=\"python\">output.close() <\/code><\/pre>\n<p>  \u0417\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043a\u0430\u043f\u0447\u0443:  <\/p>\n<pre><code class=\"python\">return img_tag <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 capthaGenerate, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u043a\u0430\u043f\u0447\u0443 \u0432 \u0432\u0438\u0434\u0435:  <\/p>\n<pre><code class=\"html\">&lt;img src=&quot;data:image\/png;base64,iVBORw0KGgo.......IAAAAASUVORK5CYII=&quot; value=&quot;7751c855c78d509b94f3e07e3d4e28f9&quot;&gt; <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0432\u0430\u043b\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u043f\u0447\u0438 \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0432\u0435\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0438 value \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0432 \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u043a\u043b\u044e\u0447, \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0432 md5+\u0441\u043e\u043b\u044c \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u043d\u0443, \u0438\u043b\u0438 \u0440\u0430\u0441\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c value \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0441 \u043a\u043b\u044e\u0447\u043e\u043c, \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c, \u043a\u0430\u043a \u0443\u0433\u043e\u0434\u043d\u043e \u0434\u0443\u0448\u0435.<\/p>\n<p>  \u041d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u043a\u0430\u043f\u0447\u0443:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/1e1\/5da\/e5f\/1e15dae5fbf44b18c5761d3146b29e85.jpg\"\/><\/p>\n<p>  \u041f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0439 \u043a\u043e\u0434 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"python\">from hashlib import md5 from PIL import Image, ImageDraw, ImageFont import random from StringIO import StringIO  def capthaGenerate(request):     path = &quot;\/usr\/share\/nginx\/wavebox\/files\/static\/c\/&quot;     im = Image.new('RGBA', (200, 50), (0, 0, 0, 0))     draw = ImageDraw.Draw(im)     number = &quot;&quot;     margin_left = 0     margin_top = 0     colorNUM = (&quot;0&quot;,&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;7&quot;,&quot;8&quot;,&quot;9&quot;,&quot;a&quot;,&quot;b&quot;,&quot;c&quot;,&quot;d&quot;,&quot;e&quot;,&quot;f&quot;)     i = 0     while (i &lt; 6):         font_color = &quot;#&quot;+str(random.randint(0,9))         y = 0         while (y &lt; 5):             rand = random.choice(colorNUM)             font_color = font_color+rand             y = y+1         rand_x11 = random.randint(0,100)         rand_x12 = random.randint(100,200)         rand_y11 = random.randint(0,50)         rand_y12 = random.randint(0,50)         draw.line((rand_x11, rand_y11, rand_x12, rand_y12), fill=&quot;#a9a6a6&quot;)         font_rand =str(random.randint(1,10))         fontSize_rand =random.randint(30,40)         font = ImageFont.truetype(path+&quot;fonts\/&quot;+font_rand+&quot;.ttf&quot;, fontSize_rand)         a=str(random.randint(0,9))         draw.text((margin_left,margin_top), a,fill=str(font_color),font=font)         rand_x11 = random.randint(0,100)         rand_x12 = random.randint(100,200)         rand_y11 = random.randint(0,50)         rand_y12 = random.randint(0,50)         draw.line((rand_x11, rand_y11, rand_x12, rand_y12), fill=&quot;#a9a6a6&quot;)         margin_left = margin_left+random.randint(20,35)         margin_top = random.randint(0,20)         i = i+1         number = number+a     salt = &quot;$@!SAf*$@)ASFfacnq==124-2542SFDQ!@$1512czvaRV&quot;     key = md5(str(number+salt)).hexdigest()     output = StringIO()     im.save(output, format=&quot;PNG&quot;)     contents = output.getvalue().encode(&quot;base64&quot;).replace(&quot;\\n&quot;, &quot;&quot;)     img_tag = '&lt;img value=&quot;'+key+'&quot; src=&quot;data:image\/png;base64,{0}&quot;&gt;'.format(contents)     output.close()     return img_tag <\/code><\/pre>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043d\u0435\u0438\u0434\u0435\u0430\u043b\u0435\u043d \u0438 \u043c\u043e\u0436\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e \u0435\u0449\u0435 \u0432\u043d\u0435\u0441\u0442\u0438, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0430\u043d\u0434\u043e\u043c\u043d\u044b\u0439 \u0446\u0432\u0435\u0442 \u0438 \u0442\u043e\u043b\u0449\u0438\u043d\u0443 \u043b\u0438\u043d\u0438\u0439 + \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u0434\u043d\u0438\u0439 \u0444\u043e\u043d \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0448\u0443\u043c \u0432 \u0432\u0438\u0434\u0435 \u0448\u0430\u0440\u0438\u043a\u043e\u0432, \u0434\u0430 \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e \u0435\u0449\u0435, \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b, \u0430 \u0442\u0430\u043c \u0443\u0436\u0435 \u043f\u043e\u043b\u0435\u0442 \u0444\u0430\u043d\u0442\u0430\u0437\u0438\u0438. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u043a\u043e\u043c\u0443-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430. \t\t\t \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\/175079\/\"> http:\/\/habrahabr.ru\/post\/175079\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/b9d\/712\/ced\/b9d712ced3ad1640fa1191772928ac36.png\"\/><br \/>  \u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e. \u0412\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u043f\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u043a\u0430\u043f\u0447\u0438. \u0425\u043e\u0442\u0435\u043b \u0441 \u043d\u0443\u043b\u044f \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0435, \u0442\u0430\u043a \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043f\u043e\u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0448\u043a\u0443\u0440\u0435, \u043a\u0430\u043a \u0440\u0435\u0448\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u044b \u0441\u043e \u0441\u0442\u0430\u0436\u0435\u043c, \u0434\u0443\u043c\u0430\u044e, \u0437\u0430\u043a\u0438\u0434\u0430\u044e\u0442 \u0448\u0430\u043f\u043a\u0430\u043c\u0438, \u043d\u043e, \u0431\u0443\u0434\u0443 \u043d\u0430\u0434\u0435\u0435\u0442\u0441\u044f, \u043a\u043e\u043c\u0443-\u043d\u0438\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u0435\u0437\u0435\u043d, \u0445\u043e\u0442\u044f \u0431\u044b \u0442\u043e\u043b\u0438\u043a\u0430 \u0438\u0437 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0442\u0443\u0442 \u043e\u043f\u0438\u0448\u0443.  <\/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-175079","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/175079","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=175079"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/175079\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=175079"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=175079"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=175079"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}