{"id":197308,"date":"2013-10-27T01:57:03","date_gmt":"2013-10-26T21:57:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=197308"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=197308","title":{"rendered":"<span class=\"post_title\">\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c \u0442\u0435\u0433\u043e\u0432 \u0425\u0430\u0431\u0440\u0430: \u043a\u0430\u043a\u0438\u0435 \u0442\u0440\u0435\u043d\u0434\u044b \u0432 \u043f\u043e\u0441\u0442\u0430\u0445?<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/9f8\/ff3\/c68\/9f8ff3c68458f8f2f2a037457b054c52.png\" alt=\"HabrTrend\" align=\"right\"\/><br \/>  \u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a!<\/p>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0442\u0435\u043d\u0434\u0435\u043d\u0446\u0438\u0438. \u0413\u043b\u044f\u0434\u044f \u043d\u0430 \u0442\u043e, \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 <a href=\"http:\/\/www.google.com\/trends\/explore\/\">google<\/a> \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0442\u0440\u0435\u043d\u0434\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0442\u0435\u0433\u043e\u0432 \u0425\u0430\u0431\u0440\u0430. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0435 \u0432\u0441\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0434\u043e\u0431\u0440\u043e\u0441\u043e\u0432\u0435\u0441\u0442\u043d\u043e \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0442\u0435\u0433\u0438, \u043d\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0432 \u044d\u0442\u043e \u043a\u0430\u043a \u0438\u0441\u0442\u0438\u043d\u0443, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u043f\u043b\u043e\u0445\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b. \u0418\u0442\u0430\u043a, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c. <br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>1. \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/h4>\n<p>  \u0427\u0435\u0441\u0442\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0431\u044b\u043b\u0430 \u043c\u044b\u0441\u043b\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u0442\u0435\u0433\u0438 \u0438 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0443\u0431\u044b\u0432\u0430\u043d\u0438\u044e, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432, \u043a\u0430\u043a\u0438\u0435 \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f, \u0430 \u043a\u0430\u043a\u0438\u0435 \u043d\u0435\u0442. \u041d\u043e \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0439\u0442\u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u2014 \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0434\u0430\u0442\u0443 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u044d\u0442\u0443 \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0433\u0440\u0430\u0444\u0438\u043a\u0438. \u0412\u0441\u0451 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432 \u043a\u043e\u043d\u0446\u0435, \u0430 \u043f\u043e\u043a\u0430 \u043d\u0430\u0447\u043d\u0451\u043c \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430.<\/p>\n<p>  \u0421\u0440\u0430\u0437\u0443 \u043e\u0433\u043e\u0432\u043e\u0440\u044e\u0441\u044c, \u0447\u0442\u043e \u0434\u0430\u043b\u0435\u0435 \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u043e\u0432\u043e \u00ab\u0442\u0435\u0433\u00bb \u2014 \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u0447\u0442\u043e \u0438 \u0442\u044d\u0433, \u0442\u0430\u0433, \u043c\u0435\u0442\u043a\u0430. \u041f\u0438\u0441\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0434 python 3.3.2, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u043d\u0451\u043c \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441 \u044e\u043d\u0438\u043a\u043e\u0434\u043e\u043c.<\/p>\n<h4>2. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h4>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c 2 \u0442\u0430\u0431\u043b\u0438\u0446\u044b post_tags \u0438 tags. \u041f\u043e\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0439 pid \u2014 \u0438\u0434 \u043f\u043e\u0441\u0442\u0430, tid \u2014 \u0438\u0434 \u0442\u0435\u0433\u0430, date \u2014 \u0434\u0430\u0442\u0430 \u043f\u043e\u0441\u0442\u0430 \u0441 \u0442\u0435\u0433\u043e\u043c. \u041f\u043e\u043b\u044f \u0432\u0442\u043e\u0440\u043e\u0439 rowid \u2014 \u0438\u0434 \u0442\u0435\u0433\u0430, tag_title \u2014 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0442\u0435\u0433\u0430. \u0422\u0443\u0442 \u0432\u0441\u0451 \u043f\u0440\u0435\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0430\u0437\u043e\u0439.<\/p>\n<pre><code class=\"python\">import sqlite3  class Base:     def __init__(self,dbname):         self.con=sqlite3.connect(dbname)      def __del__(self):         self.con.close( )      def maketables(self):         &quot;&quot;&quot;         \u0414\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b         &quot;&quot;&quot;         self.con.execute('create table post_tags(pid,tid,date)')         self.con.execute('create table tags(tag_title)')         self.con.commit( ) <\/code><\/pre>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u0451 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043e \u0432 \u0444\u0430\u0439\u043b tags.py, \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c:<\/p>\n<pre><code class=\"bash\">import tags extend = tags.Base('tags.db') extend.maketables() <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u0443\u0441\u0442\u0430\u044f \u0431\u0430\u0437\u0430, \u043f\u043e\u0439\u0434\u0451\u043c\u0442\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u043c \u0435\u0451.<\/p>\n<h4>3. \u041f\u0430\u0440\u0441\u0438\u043d\u0433 \u0442\u0435\u0433\u043e\u0432<\/h4>\n<p>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435 \u0442\u0435\u0433\u0438 \u0438 \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0441 \u0434\u0430\u0442\u043e\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e\u0441\u0442\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <a href=\"http:\/\/www.crummy.com\/software\/BeautifulSoup\/\">beautifulsoup<\/a> \u0438 <a href=\"http:\/\/docs.python.org\/3.0\/library\/urllib.request.html\">urllib.request<\/a>.<\/p>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:  <\/p>\n<ul>\n<li>get_tag \u2014 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0442\u0435\u0433\u0430 \u0438\u0437 \u0431\u0430\u0437\u044b<\/li>\n<li>add_tag \u2014 \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u0433\u0430<\/li>\n<li>add_post \u2014 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u0430<\/li>\n<\/ul>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">    def get_tag(self, name, added = True):         &quot;&quot;&quot;         \u041f\u043e\u0438\u0441\u043a \u0442\u0435\u0433\u0430, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u0432\u0435\u0440\u043d\u0443\u0442\u044c tid, \u0438\u043d\u0430\u0447\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439         cur - \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0442\u0435\u0433         res - \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d \u0435\u0441\u043b\u0438 \u0442\u0435\u0433 \u0443\u0436\u0435 \u0432 \u0431\u0430\u0437\u0435         added - \u0424\u043b\u0430\u0433\/ \u0435\u0441\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c false         &quot;&quot;&quot;         cur=self.con.execute(&quot;select rowid from %s where %s='%s'&quot; % ('tags','tag_title',name))         res=cur.fetchone( )         if res==None:             if added:                 cur=self.con.execute(&quot;insert into %s (%s) values ('%s')&quot; % ('tags','tag_title',name))                 self.con.commit( )                 return cur.lastrowid             else:                 return False         else:             return res[0]      def add_tag(self, pid, name, date):         &quot;&quot;&quot;         \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u0442\u0435\u0433\u0430         pid - \u0438\u0434 \u043f\u043e\u0441\u0442\u0430         name - \u0441\u0430\u043c \u0442\u0435\u0433         date - \u0434\u0430\u0442\u0430 \u043f\u043e\u0441\u0442\u0430         &quot;&quot;&quot;         rowid = self.get_tag(name);         print(pid,rowid ,name, date)         self.con.execute(&quot;insert into %s (%s,%s,%s) values (%d,%d,'%s')&quot; % ('post_tags','pid','tid','date',pid,rowid,date))         self.con.commit( )      def add_post(self, pid):         &quot;&quot;&quot;         \u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u043f\u043e\u0441\u0442\u0430 (\u0432\u044b\u0431\u043e\u0440\u043a\u0430 \u0434\u0430\u0442\u044b \u0438 \u0442\u0435\u0433\u043e\u0432)         &quot;&quot;&quot;         if (self.get_post(pid)):             return          print('-'*10,'http:\/\/habrahabr.ru\/post\/'+str(pid),'-'*10)         cur=self.con.execute(&quot;select pid from %s where %s=%d&quot; % ('post_tags','pid',pid))         res=cur.fetchone( )         if res==None:             try:                 soup=BeautifulSoup(urllib.request.urlopen('http:\/\/habrahabr.ru\/post\/'+str(pid)).read( ))             except (urllib.request.HTTPError):                 self.add_tag(pid,&quot;parse_error_404&quot;,&quot;&quot;)                 print(&quot;error 404&quot;)             else:                 published = soup.find(&quot;div&quot;, { &quot;class&quot; : &quot;published&quot; })                 tags = soup.find(&quot;ul&quot;, { &quot;class&quot; : &quot;tags&quot; })                 if tags:                     for tag in tags.findAll(&quot;a&quot;):                         self.add_tag(pid, tag.string, get_date(published.string))                 else:                     self.add_tag(pid,&quot;parse_access_denied&quot;,&quot;&quot;)                     print(&quot;access denied&quot;)         else:             print(&quot;post has already&quot;) <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043d\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0431\u0430\u0437\u0443 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0446\u0438\u043a\u043b \u043f\u043e \u0432\u0441\u0435\u043c \u043f\u043e\u0441\u0442\u0430\u043c. \u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c\u0441\u044f <a href=\"http:\/\/habrahabr.ru\/post\/196000\/\">196000<\/a> \u043e\u043d \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u043d\u0430 1 \u043e\u043a\u0442\u044f\u0431\u0440\u044f 2013.<\/p>\n<pre><code class=\"python\">for pid in range(196000):     extend.add_post(pid+1) <\/code><\/pre>\n<p>  \u0417\u043d\u0430\u044e, \u0447\u0442\u043e \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0438 \u0441 \u043c\u0435\u0433\u0430\u0431\u0438\u0442\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0431\u044b \u043e\u043a\u043e\u043b\u043e 170 \u0447\u0430\u0441\u043e\u0432.   <\/p>\n<blockquote><p>\u0414\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0431\u044b\u043b\u043e \u0440\u0435\u0448\u0435\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u043d\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 post, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u0434 \u043f\u043e\u0441\u0442\u0430, \u043d\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 \u0441 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e, \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043a\u0430\u043a \u0444\u043b\u0430\u0433. \u0422\u0430\u043a \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u00ab\u0432\u0438\u0441\u0438\u0442\u00bb. \u0412 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0449\u0451 \u043f\u0430\u0440\u0443 \u0442\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0438 \u043d\u0430\u0442\u0440\u0430\u0432\u0438\u0432 \u043d\u0430 \u043e\u0434\u043d\u0443 \u0431\u0430\u0437\u0443 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0435\u0451 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e. \u0412\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u043b\u0438\u0437\u0438\u0439 \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 \u043a\u043e\u043d\u0446\u043e\u0432 \u043f\u043e\u0442\u0435\u0440\u044f \u0438\u043b\u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0430 3% \u043f\u043e\u0441\u0442\u043e\u0432, \u0447\u0442\u043e \u043d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e. \u041f\u043e\u0441\u043b\u0435 \u0442\u0430\u043a\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 8 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c, \u0442.\u043a. \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 9 \u0425\u0430\u0431\u0440 \u043e\u0442\u0434\u0430\u0435\u0442 <a href=\"http:\/\/ru.wikipedia.org\/wiki\/%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA_%D0%BA%D0%BE%D0%B4%D0%BE%D0%B2_%D1%81%D0%BE%D1%81%D1%82%D0%BE%D1%8F%D0%BD%D0%B8%D1%8F_HTTP#503\">503 \u043e\u0448\u0438\u0431\u043a\u0443<\/a>, \u0447\u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0432 6 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u0432 (\u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u043e \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u043d\u0435 \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432\u0430\u043b\u043e \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439), \u0431\u044b\u043b\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0430 <a href=\"https:\/\/db.tt\/vT2KqaQA\">\u0431\u0430\u0437\u0430<\/a>(17 Mb).<\/p><\/blockquote>\n<p>  <\/p>\n<h4>4. \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u2014 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.<br \/>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:  <\/p>\n<ul>\n<li>get_count_byid \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e \u0438\u0434 \u0442\u0435\u0433\u0430<\/li>\n<li>get_graph \u2014 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439 (\u0434\u0430\u0442\u0430, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e)<\/li>\n<li>get_image \u2014 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435<\/li>\n<li>get_all_tags_sorted \u2014 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0443\u0431\u044b\u0432\u0430\u043d\u0438\u044e<\/li>\n<li>get_all_tag_count \u2014 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439 (\u0438\u0434, \u0442\u0435\u0433, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e)<\/li>\n<\/ul>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">    def get_count_byname(self, name, date = ''):         &quot;&quot;&quot;         \u041d\u0430\u0439\u0442\u0438 name \u043f\u043e tid \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u0438\u0437 get_count_byid         name - \u0438\u043c\u044f \u0442\u0435\u0433\u0430         date - (*)\u0434\u0430\u0442\u0430 \u0424\u043e\u0440\u043c\u0430\u0442 mm_yyyy         &quot;&quot;&quot;         tid = self.get_tag(name, False)         return self.get_count_byid(tid, date)      def get_count_byid(self, tid, date = ''):         &quot;&quot;&quot;         \u0412\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430 \u0432\u0435\u0441\u044c \u043f\u0435\u0440\u0438\u043e\u0434 \u0438\u043b\u0438 \u0437\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u0443\u044e \u0434\u0430\u0442\u0443         &quot;&quot;&quot;         if tid:             if date:                 count=self.con.execute(&quot;select count(pid) from %s where %s=%d and %s='%s'&quot; % ('post_tags','tid',tid,'date',date))             else:                 count=self.con.execute(&quot;select count(pid) from %s where %s=%d&quot; % ('post_tags','tid',tid))             res=count.fetchone( )             return res[0]         else:             return False      def get_graph(self, name):         &quot;&quot;&quot;         \u0424\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u0430\u0442\u0430 - \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e         &quot;&quot;&quot;         month = ('01','\u044f\u043d\u0432\u0430\u0440\u044f'),('02','\u0444\u0435\u0432\u0440\u0430\u043b\u044f'),('03','\u043c\u0430\u0440\u0442\u0430'),('04','\u0430\u043f\u0440\u0435\u043b\u044f'),('05','\u043c\u0430\u044f'),('06','\u0438\u044e\u043d\u044f'),('07','\u0438\u044e\u043b\u044f'),('08','\u0430\u0432\u0433\u0443\u0441\u0442\u0430'),('09','\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f'),('10','\u043e\u043a\u0442\u044f\u0431\u0440\u044f'),('11','\u043d\u043e\u044f\u0431\u0440\u044f'),('12','\u0434\u0435\u043a\u0430\u0431\u0440\u044f')         years = [2006,2007,2008,2009,2010,2011,2012,2013]          graph = []         for Y in years:             for M,M_str in month:                 date = str(M)+'_'+str(Y)                 graph.append((date, self.get_count_byname(name, date)))         return graph      def get_image(self, name):         &quot;&quot;&quot;         \u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430         m_x - \u043c\u0430\u0441\u0448\u0442\u0430\u0431 \u043f\u043e X         m_y - \u043c\u0430\u0441\u0448\u0442\u0430\u0431 \u043f\u043e Y         img_x - \u0448\u0438\u0440\u0438\u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0430         img_y - \u0432\u044b\u0441\u043e\u0442\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0430         &quot;&quot;&quot;         img_x = 960         img_y = 600          img=Image.new('RGB',(img_x,img_y),(255,255,255))         draw=ImageDraw.Draw(img)          graph = self.get_graph(name)         max_y = max(graph,key=lambda item:item[1])[1]         if max_y == 0:             print('tag not found')             return False         m_x, m_y = int(img_x\/(len(graph))), int(img_y\/max_y)          draw.text((10, 10), str(max_y), (0,0,0))         draw.text((10, 20), name, (0,0,0))          x,prev_y = 0,-1         for x_str, y in graph:             x += 1             if (x%12 == 1): draw.text((x*m_x, img_y - 30), str(x_str[3:]),(0,0,0))             if prev_y &gt;= 0: draw.line(((x-1)*m_x, img_y-prev_y*m_y-1, x*m_x, img_y-y*m_y-1), fill=(255,0,0))             prev_y = y          img.save('graph.png','PNG')         Image.open('graph.png').show()      def get_all_tags_sorted(self, tags):         &quot;&quot;&quot;         \u041f\u043e \u0443\u0431\u044b\u0432\u0430\u043d\u0438\u044e         &quot;&quot;&quot;         return sorted(tags, key=lambda tag:tag[2], reverse=True)      def get_all_tag_count(self):         count=self.con.execute(&quot;select count(rowid) from %s&quot; % ('tags'))         res=count.fetchone( )         alltag_count = res[0]         tags = []         for tag_id in range(alltag_count-1):             tags.append((tag_id+1,self.get_tag_name(tag_id+1),self.get_count_byid(tag_id+1)))             print (tag_id+1,self.get_tag_name(tag_id+1),self.get_count_byid(tag_id+1))         return tags <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  <\/p>\n<h4>5. \u0418\u0442\u043e\u0433 (\u0434\u043b\u044f \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u0435\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438)<\/h4>\n<p>  Top 25 \u00ab\u0442\u0435\u0433\u043e\u0432 \u043b\u0438\u0434\u0435\u0440\u043e\u0432\u00bb:  <\/p>\n<ol>\n<li>google \u2014 2611<\/li>\n<li>android \u2014 2188<\/li>\n<li>Google \u2014 2024<\/li>\n<li>linux \u2014 1978<\/li>\n<li>php \u2014 1947<\/li>\n<li>javascript \u2014 1877<\/li>\n<li>microsoft \u2014 1801<\/li>\n<li>apple \u2014 1668<\/li>\n<li>\u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 \u2014 1509<\/li>\n<li>\u0441\u0442\u0430\u0440\u0442\u0430\u043f\u044b \u2014 1484<\/li>\n<li>\u0441\u0442\u0430\u0440\u0442\u0430\u043f \u2014 1317<\/li>\n<li>\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u2014 1229<\/li>\n<li>Microsoft \u2014 1220<\/li>\n<li>java \u2014 1180<\/li>\n<li>\u0438\u0433\u0440\u044b \u2014 1141<\/li>\n<li>Apple \u2014 1135<\/li>\n<li>iphone \u2014 1122<\/li>\n<li>\u0434\u0438\u0437\u0430\u0439\u043d \u2014 1110<\/li>\n<li>python \u2014 1108<\/li>\n<li>\u044e\u043c\u043e\u0440 \u2014 1061<\/li>\n<li>\u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u2014 1040<\/li>\n<li>\u0445\u0430\u0431\u0440\u0430\u0445\u0430\u0431\u0440 \u2014 983<\/li>\n<li>\u0432\u0438\u0434\u0435\u043e \u2014 970<\/li>\n<li>\u0440\u0435\u043a\u043b\u0430\u043c\u0430 \u2014 968<\/li>\n<li>Android \u2014 876<\/li>\n<\/ol>\n<p>  \u041f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/db.tt\/PTvrAKum\">\u0442\u0443\u0442<\/a> (\u0444\u043e\u0440\u043c\u0430\u0442 id, title_tag, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0439).<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a \u043c\u044b\u0441\u043b\u0438 \u043e \u0442\u0440\u0435\u043d\u0434\u0430\u0445. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043f\u0430\u0440\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 (\u043a\u043b\u0438\u043a\u0430\u0431\u0435\u043b\u044c\u043d\u043e):  <\/p>\n<table cellpadding=\"2\" border=\"1\">\n<tr>\n<td><b>python<\/b><\/td>\n<td><b>javascript<\/b><\/td>\n<td><b>android<\/b><\/td>\n<\/tr>\n<tr>\n<td><a href=\"http:\/\/habrastorage.org\/storage3\/b43\/02b\/08a\/b4302b08a0e20876d802a408264be6d0.png\"><img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/64a\/a89\/0ad\/64aa890ad77ea3012e201b772da40eca.png\"\/><\/a><\/td>\n<td><a href=\"http:\/\/habrastorage.org\/storage3\/eee\/849\/088\/eee8490888aaee3a0493353955ce2599.png\"><img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/5e6\/71a\/cbf\/5e671acbfc9dc54f49e120e613dc4ffd.png\"\/><\/a><\/td>\n<td><a href=\"http:\/\/habrastorage.org\/storage3\/ce5\/56d\/dad\/ce556ddade5c0b653431acbf5717a9b1.png\"><img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/e31\/e0e\/036\/e31e0e0369882792412245ededbd432c.png\"\/><\/a><\/td>\n<\/tr>\n<\/table>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 get_image(tag_title).<\/p>\n<p>  \u042f \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u043b\u0443\u0447\u0448\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430, \u043d\u043e \u00ab\u044f \u043d\u0435 \u0432\u043e\u043b\u0448\u0435\u0431\u043d\u0438\u043a, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0447\u0443\u0441\u044c\u00bb. \u041f\u0440\u043e\u0448\u0443 \u0432\u0441\u0435\u0445 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0434\u043b\u044f \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0439 \u0438 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439.<br \/>  \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u043c\u043e\u044f \u0446\u0435\u043b\u044c \u0431\u044b\u043b\u0430 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u0430. \u0425\u043e\u0442\u044f \u0443\u0436\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043c\u044b\u0441\u043b\u0438 \u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 \u0438 \u043c\u043e\u0440\u0444\u043e\u043b\u043e\u0433\u0438\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0435\u0433\u043e\u0432.<\/p>\n<p>  \u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432\u044b\u043b\u043e\u0436\u0435\u043d \u043d\u0430 <a href=\"https:\/\/github.com\/denisbalyko\/HabrTrend\">github<\/a>.<\/p>\n<p>  \u0412\u0441\u0435\u043c \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u043a\u0440\u0438\u0442\u0438\u043a\u0435.    \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\/197308\/\"> http:\/\/habrahabr.ru\/post\/197308\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/9f8\/ff3\/c68\/9f8ff3c68458f8f2f2a037457b054c52.png\" alt=\"HabrTrend\" align=\"right\"\/><br \/>  \u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a!<\/p>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0442\u0435\u043d\u0434\u0435\u043d\u0446\u0438\u0438. \u0413\u043b\u044f\u0434\u044f \u043d\u0430 \u0442\u043e, \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 <a href=\"http:\/\/www.google.com\/trends\/explore\/\">google<\/a> \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0442\u0440\u0435\u043d\u0434\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0442\u0435\u0433\u043e\u0432 \u0425\u0430\u0431\u0440\u0430. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0435 \u0432\u0441\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0434\u043e\u0431\u0440\u043e\u0441\u043e\u0432\u0435\u0441\u0442\u043d\u043e \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0442\u0435\u0433\u0438, \u043d\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0432 \u044d\u0442\u043e \u043a\u0430\u043a \u0438\u0441\u0442\u0438\u043d\u0443, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u043f\u043b\u043e\u0445\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b. \u0418\u0442\u0430\u043a, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c.   <\/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-197308","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/197308","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=197308"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/197308\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=197308"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=197308"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=197308"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}