{"id":325956,"date":"2021-07-05T09:00:06","date_gmt":"2021-07-05T09:00:06","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=325956"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=325956","title":{"rendered":"\u0411\u0435\u043a\u0430\u043f\u0438\u043c \u0433\u0438\u0444\u043a\u0438 \u0438\u0437 Telegram"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p>\u041c\u044b \u0431\u0435\u043a\u0430\u043f\u0438\u043c \u0432\u0430\u0436\u043d\u044b\u0435 \u0434\u043b\u044f \u043d\u0430\u0441 \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u0437\u0430\u0431\u0435\u043a\u0430\u043f\u0438\u0442\u044c \u0433\u0438\u0444\u043a\u0438 \u0438\u0437 \u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u0430?<br \/>  \u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u0442\u0430\u043a\u043e\u0435 \u043d\u0435 \u0443\u043c\u0435\u044e\u0442, \u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 API \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c<br \/>  \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0434\u0435\u043b\u043e, \u0438\u0437\u0431\u0430\u0432\u0438\u0432 \u043e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0433\u0438\u0444\u043a\u0438 \u043f\u043e \u043e\u0434\u043d\u043e\u0439.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 Go \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u0438\u0435\u043d\u0442\u0430 <a href=\"https:\/\/github.com\/gotd\/td\" rel=\"nofollow noopener noreferrer\">gotd<\/a>,<br \/>  \u0430 \u0434\u043b\u044f \u043d\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u0438\u0432\u044b\u0445 \u0434\u0430\u043c \u0441\u0440\u0430\u0437\u0443 <a href=\"https:\/\/github.com\/ernado\/telegifdl\" rel=\"nofollow noopener noreferrer\">\u0441\u0441\u044b\u043b\u043a\u0443<\/a> \u043d\u0430 \u0433\u043e\u0442\u043e\u0432\u0443\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h1 id=\"registriruem-prilozhenie\">\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/h1>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u044f\u043c\u044b\u0435 MTProto \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a Telegram API, \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<br \/>  \u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u043e, \u043d\u043e \u0437\u0430\u0442\u043e \u044d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u0418\u0434\u0435\u043c \u043d\u0430 <a href=\"https:\/\/my.telegram.org\/apps\" rel=\"nofollow noopener noreferrer\">https:\/\/my.telegram.org\/apps<\/a><\/li>\n<li>\u041b\u043e\u0433\u0438\u043d\u0438\u043c\u0441\u044f<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u044f \u0435\u0433\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/li>\n<li>\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c <code>api_id<\/code> \u0438 <code>api_hash<\/code>, \u043e\u043d\u0438 \u043d\u0430\u043c \u043f\u0440\u0438\u0433\u043e\u0434\u044f\u0442\u0441\u044f<\/li>\n<\/ol>\n<p>  <\/p>\n<h1 id=\"sozdaem-klient\">\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442<\/h1>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0432 <code>api_id<\/code> \u0438 <code>api_hash<\/code>, \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0438\u0445 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<br \/>  <code>APP_ID<\/code> \u0438 <code>APP_HASH<\/code>, \u0442\u043e\u0433\u0434\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>ClientFromEnvironment<\/code> \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441<br \/>  \u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u043e\u043c \u0438\u0437 Go:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ Initializing client from environment. \/\/ Available environment variables: \/\/  APP_ID:         api_id of Telegram app. \/\/  APP_HASH:       api_hash of Telegram app. \/\/  SESSION_FILE:   path to session file \/\/  SESSION_DIR:    path to session directory, if SESSION_FILE is not set client, err := telegram.ClientFromEnvironment(telegram.Options{     Logger: log, }) if err != nil {     return err }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043d\u0435 \u043b\u043e\u0433\u0438\u043d\u0438\u0442\u044c\u0441\u044f (\u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c \u0442\u0430\u043a\u043e\u0435 \u043d\u0435 \u043b\u044e\u0431\u0438\u0442 \u0438 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0435 \u0441\u0435\u0441\u0441\u0438\u0438),<br \/>  \u043b\u0443\u0447\u0448\u0435 \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <code>SESSION_FILE<\/code>, \u0442\u043e\u0433\u0434\u0430 \u043a\u043b\u044e\u0447 \u0441\u0435\u0441\u0441\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d \u0438 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u043f\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445<br \/>  \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0445.<\/p>\n<p>  <\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>ClientFromEnvironment<\/code> \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c <code>NewClient<\/code> \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e<br \/>  \u0438 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b.<\/p>\n<p>  <\/p>\n<h1 id=\"loginimsya\">\u041b\u043e\u0433\u0438\u043d\u0438\u043c\u0441\u044f<\/h1>\n<p>  <\/p>\n<p>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u043e\u0432\u043d\u043e \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u044e\u0442 \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u044b:<br \/>  \u0432\u0432\u0435\u0441\u0442\u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d, \u043a\u043e\u0434 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f (\u0438 \u0434\u0432\u0443\u0445\u0444\u0430\u043a\u0442\u043e\u0440\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c).<br \/>  \u0412 gotd \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0435\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <code>UserAuthenticator<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ UserAuthenticator asks user for phone, password and received authentication code. type UserAuthenticator interface {     Phone(ctx context.Context) (string, error)     Password(ctx context.Context) (string, error)     AcceptTermsOfService(ctx context.Context, tos tg.HelpTermsOfService) error     SignUp(ctx context.Context) (UserInfo, error)     Code(ctx context.Context, sentCode *tg.AuthSentCode) (string, error) }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u044b \u043f\u0438\u0448\u0435\u043c \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u0443\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u0443, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u043c \u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ terminalAuth implements auth.UserAuthenticator prompting the terminal for \/\/ input. type terminalAuth struct{}  func (terminalAuth) Phone(_ context.Context) (string, error) {     fmt.Print(&quot;Enter phone: &quot;)     code, err := bufio.NewReader(os.Stdin).ReadString('\\n')     if err != nil {         return &quot;&quot;, err     }     return strings.TrimSpace(code), nil }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u043b\u044f <code>Code<\/code> \u0438 <code>Phone<\/code>. \u0414\u043b\u044f <code>Password<\/code> \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442 <code>golang.org\/x\/crypto\/ssh\/terminal<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">bytePwd, err := terminal.ReadPassword(syscall.Stdin)<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0432\u0432\u043e\u0434 \u043f\u0430\u0440\u043e\u043b\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435.<br \/>  \u0414\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432 <code>AcceptTermsOfService<\/code> \u0438 <code>SignUp<\/code> \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443 \u0438\u043b\u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c <code>panic()<\/code>,<br \/>  \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u044b \u0438 \u044d\u0442\u0438 \u043c\u0435\u0442\u043e\u0434\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0443\u0442.<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u0432\u043e\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u0438\u0440\u0443\u0435\u043c flow \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">\/\/ Setting up authentication flow. \/\/ Current flow will read phone, code and 2FA password from terminal. flow := auth.NewFlow(terminalAuth{}, auth.SendCodeOptions{})<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e\u0442 <code>flow<\/code> \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0441\u0435\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0432\u044b\u0437\u044b\u0432\u0430\u044f \u043c\u0435\u0442\u043e\u0434\u044b \u0438\u0437 <code>terminalAuth<\/code><br \/>  \u043f\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043a\u043e\u0434\u0430.<\/p>\n<p>  <\/p>\n<h1 id=\"delaem-pervyy-zapros\">\u0414\u0435\u043b\u0430\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441<\/h1>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0451 \u0433\u043e\u0442\u043e\u0432\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0439\u0442\u0438 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u0434\u0435\u043b\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">client, err := telegram.ClientFromEnvironment(telegram.Options{     Logger: log, }) if err != nil {     return err } flow := auth.NewFlow(terminalAuth{}, auth.SendCodeOptions{}) client.Run(ctx, func(ctx context.Context) error {     \/\/ Perform auth if no session is available.     if err := client.Auth().IfNecessary(ctx, flow); err != nil {         return xerrors.Errorf(&quot;auth: %w&quot;, err)     }      \/\/ Now we can make API calls.      return nil }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u044b \u0432\u044b\u0437\u0432\u0430\u043b\u0438 <code>client.Auth().IfNecessary(ctx, flow)<\/code>, \u043d\u0430\u0448 \u043a\u043b\u0438\u0435\u043d\u0442<br \/>  \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u0436\u0435 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d \u043f\u043e\u0434 \u043d\u0443\u0436\u043d\u044b\u043c \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u043e\u043c \u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0433\u0438\u0444\u043a\u0438.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 <a href=\"https:\/\/core.telegram.org\/method\/messages.getSavedGifs\" rel=\"nofollow noopener noreferrer\">messages.getSavedGifs<\/a> \u0438<br \/>  \u0438 \u0435\u0433\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0431\u0440\u0430\u0442-\u0431\u043b\u0438\u0437\u043d\u0435\u0446 \u043d\u0430 Go, tg.Client.MessagesGetSavedGifs.<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u044b\u0440\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043e\u0431\u0435\u0440\u0442\u043a\u0443 \u043d\u0430\u0434 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">api := client.API()<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446-\u0442\u043e, \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u0433\u0438\u0444\u043a\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">result, err := api.MessagesGetSavedGifs(ctx, 0) if err != nil {     return xerrors.Errorf(&quot;get: %w&quot;, err) }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043e\u0442\u0432\u0435\u0442 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c <code>MessagesSavedGifsClass<\/code>, \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 <code>MessagesSavedGifs<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">type MessagesSavedGifs struct {     \/\/ Hash for pagination, for more info click here\u00b9     \/\/     \/\/ Links:     \/\/  1) https:\/\/core.telegram.org\/api\/offsets#hash-generation     Hash int     \/\/ List of saved gifs     Gifs []DocumentClass }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0432\u0437\u044f\u0442\u044c \u0432\u0441\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438\u0437 Gifs \u0438 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438\u0445.<\/p>\n<p>  <\/p>\n<h1 id=\"skachivaem\">\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c<\/h1>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0435\u0441\u0442\u044c \u043f\u0430\u043a\u0435\u0442 <code>downloader<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u044b \u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f.<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">d := downloader.NewDownloader()<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430 \u0432\u0445\u043e\u0434 \u043e\u043d \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 <code>tg.InputFileLocationClass<\/code>, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 <code>DocumentClass<\/code> \u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u043c\u0443 \u0432\u0438\u0434\u0443,<br \/>  \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">result, err := api.MessagesGetSavedGifs(ctx, 0) if err != nil {     return xerrors.Errorf(&quot;get: %w&quot;, err) } switch result := result.(type) { case *tg.MessagesSavedGifsNotModified:     \/\/ Done.     return nil case *tg.MessagesSavedGifs:     for _, doc := range result.Gifs {         doc, ok := doc.AsNotEmpty()         if !ok {             continue         }          loc := doc.AsInputDocumentFileLocation()         if _, err := d.Download(api, loc).ToPath(ctx, fmt.Sprintf(&quot;%d.mp4&quot;, doc.ID)); err != nil {             return xerrors.Errorf(&quot;download: %w&quot;, err)         }     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u043e\u0436\u043d\u043e, \u0442.\u043a. \u043c\u044b \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u043c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0441 API \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u0430 \u0438 \u0442\u0430\u043a\u043e\u0435 \u043e\u0431\u044b\u0447\u043d\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442<br \/>  \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u0438\u0445 \u0442\u0438\u043f\u043e\u0432 \u043a \u0434\u0440\u0443\u0433\u0438\u043c.<\/p>\n<p>  <\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0432\u0437\u044f\u043b\u0438 <code>doc.AsNotEmpty()<\/code>, \u043f\u043e\u0442\u043e\u043c <code>doc.AsInputDocumentFileLocation()<\/code>, \u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439<br \/>  \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0443\u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u0447\u0430\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0447\u0435\u0440\u0435\u0437 <code>d.Download()<\/code>.<\/p>\n<p>  <\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 <code>ToPath<\/code> \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0444\u0430\u0439\u043b \u043d\u0430 \u0434\u0438\u0441\u043a \u043f\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u0443\u0442\u0438, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043c\u044b \u0443\u0436\u0435 \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u0442\u0430\u043a\u043e\u0433\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">client, err := telegram.ClientFromEnvironment(telegram.Options{     Logger: log, }) if err != nil {     return err }  flow := auth.NewFlow(terminalAuth{}, auth.SendCodeOptions{}) api := client.API() d := downloader.NewDownloader()  return client.Run(ctx, func (ctx context.Context) error {     if err := client.Auth().IfNecessary(ctx, flow); err != nil {         return xerrors.Errorf(&quot;auth: %w&quot;, err)     }      result, err := api.MessagesGetSavedGifs(ctx, 0)     if err != nil {         return xerrors.Errorf(&quot;get: %w&quot;, err)     }     switch result := result.(type) {     case *tg.MessagesSavedGifsNotModified:         return nil     case *tg.MessagesSavedGifs:         for _, doc := range result.Gifs {             doc, ok := doc.AsNotEmpty()             if !ok {                 continue             }              loc := doc.AsInputDocumentFileLocation()             if _, err := d.Download(api, loc).ToPath(ctx, fmt.Sprintf(&quot;%d.mp4&quot;, doc.ID)); err != nil {                 return xerrors.Errorf(&quot;download: %w&quot;, err)             }         }     }     return nil })<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0432\u0441\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u0433\u0438\u0444\u043a\u0438 \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438.<\/p>\n<p>  <\/p>\n<h1 id=\"udalyaem\">\u0423\u0434\u0430\u043b\u044f\u0435\u043c<\/h1>\n<p>  <\/p>\n<p>\u0423\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u0432\u0448\u0438\u0441\u044c, \u0447\u0442\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u043d\u0430\u0434\u0435\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0433\u0438\u0444\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c.<br \/>  \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 <code>messages.saveGif<\/code> \u0441 \u0444\u043b\u0430\u0433\u043e\u043c <code>unsave<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">if _, err := api.MessagesSaveGif(ctx, &amp;tg.MessagesSaveGifRequest{     ID:     doc.AsInput(),     Unsave: true, }); err != nil {     return xerrors.Errorf(&quot;remove: %w&quot;, err) }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u044b \u0443\u0434\u0430\u043b\u0438\u043c \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u043d\u0430\u043c 200 \u0433\u0438\u0444\u043e\u043a, \u043d\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u0436\u0438\u0434\u0430\u0442\u044c \u0441\u044e\u0440\u043f\u0440\u0438\u0437:<br \/>  \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 &quot;Saved gifs&quot; \u043e\u0442\u043a\u0443\u0434\u0430-\u0442\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0433\u0438\u0444\u043a\u0438, \u0430 \u043d\u0435 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u0430\u044f \u043f\u0443\u0441\u0442\u043e\u0442\u0430.<\/p>\n<p>  <\/p>\n<p>\u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0432\u044b\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0437\u0430 \u043b\u0438\u043c\u0438\u0442 \u0433\u0438\u0444\u043a\u0438 \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430,<br \/>  \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e (\u043b\u0438\u0431\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435<br \/>  \u0432 \u0446\u0438\u043a\u043b\u0435).<\/p>\n<p>  <\/p>\n<h1 id=\"zagruzhaem-obratno\">\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u043e<\/h1>\n<p>  <\/p>\n<p>\u0411\u0435\u043a\u0430\u043f\u044b \u0431\u0435\u0437 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u2014 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u0430\u044f \u0448\u0442\u0443\u043a\u0430. \u041d\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0432 \u0442\u0435\u043b\u0435\u0433\u0440\u0430\u043c \u0433\u0438\u0444\u043a\u0438<br \/>  \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u0447\u0435\u043c \u043e\u0442\u0442\u0443\u0434\u0430 \u0438\u0445 \u0432\u044b\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0440\u044f\u043c\u043e\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0442.<br \/>  \u0417\u0430\u0442\u043e \u0435\u0441\u0442\u044c &quot;\u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439&quot;:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u0430\u0439\u043b<\/li>\n<li>\u041e\u0442\u043e\u0441\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u0441\u0435\u0431\u0435 \u0432 &quot;\u0418\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435&quot;<\/li>\n<li>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u0441\u0435\u0431\u0435 \u0432 \u0433\u0438\u0444\u043a\u0438<\/li>\n<li>\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u043b\u0438\u0448\u043d\u0435\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 (\u043f\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044e)<\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442 <code>uploader<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">u := uploader.NewUploader(api) f, err := u.FromPath(ctx, name) if err != nil {     return err }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432 <code>f<\/code> \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u0438\u0442\u044c \u043a \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044e.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 gotd \u0435\u0441\u0442\u044c \u043f\u0430\u043a\u0435\u0442 <code>messages<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">sender := message.NewSender(api).Self()<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u0451\u0442 \u0437\u0430 \u0433\u0438\u0444\u043a\u0438 \u0444\u0430\u0439\u043b\u044b \u0441 mime-type <code>video\/mp4<\/code> \u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c <code>documentAttributeAnimated<\/code>,<br \/>  \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u0444\u0430\u0439\u043b <code>f<\/code> \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">sender.Media(ctx, message.UploadedDocument(f).     Attributes(&amp;tg.DocumentAttributeAnimated{}).     MIME(&quot;video\/mp4&quot;), )<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e <code>sender.Media<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>tg.UpdatesClass<\/code>, \u043e\u0442\u043a\u0443\u0434\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043a\u0430\u043a-\u0442\u043e<br \/>  \u0432\u044b\u0442\u0430\u0449\u0438\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c \u043f\u0440\u0438\u0441\u044b\u043b\u0430\u0435\u0442 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430.<br \/>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u043f\u0430\u043a\u0435\u0442 <code>message\/unpack<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">msg, err := unpack.Message(sender.Media(ctx, message.UploadedDocument(f).     Attributes(&amp;tg.DocumentAttributeAnimated{}).     MIME(&quot;video\/mp4&quot;), ))<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432 <code>msg<\/code> \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u0441\u0430\u043c\u0438\u043c \u0441\u0435\u0431\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u043d\u043e\u0439 \u0433\u0438\u0444\u043a\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0441\u0435\u0431\u0435,<br \/>  \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0443\u043f\u0440\u0430\u0436\u043d\u044f\u0432\u0448\u0438\u0441\u044c \u0432 \u0440\u0443\u0447\u043d\u043e\u043c \u043f\u0440\u0438\u0432\u0438\u0434\u0435\u043d\u0438\u0438 \u0442\u0438\u043f\u043e\u0432:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">doc, ok := msg.Media.(*tg.MessageMediaDocument).Document.AsNotEmpty() if !ok {     return xerrors.New(&quot;unexpected document&quot;) }  _, saveErr := api.MessagesSaveGif(ctx, &amp;tg.MessagesSaveGifRequest{     ID:     doc.AsInput(), })<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043d\u0443\u0436\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"go\">if _, err := sender.Revoke().Messages(ctx, msg.ID); err != nil {     return xerrors.Errorf(&quot;delete: %w&quot;, err) }<\/code><\/pre>\n<p>  <\/p>\n<h1 id=\"itogi\">\u0418\u0442\u043e\u0433\u0438<\/h1>\n<p>  <\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0451, \u0433\u043e\u0442\u043e\u0432\u0430\u044f \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u0430\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0441 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c\u0438 \u0432 \u043a\u043e\u0434\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 <a href=\"https:\/\/github.com\/ernado\/telegifdl\" rel=\"nofollow noopener noreferrer\">\u043d\u0430 \u0433\u0438\u0442\u0445\u0430\u0431\u0435<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432-\u0445\u0435\u043b\u043f\u0435\u0440\u043e\u0432, \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0441\u044b\u0440\u044b\u043c API \u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u0430 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u0430.<br \/>  \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 <code>gotd<\/code> \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u0442\u0441\u044f, \u0438 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0449\u0435.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/566162\/\"> https:\/\/habr.com\/ru\/post\/566162\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<p>\u041c\u044b \u0431\u0435\u043a\u0430\u043f\u0438\u043c \u0432\u0430\u0436\u043d\u044b\u0435 \u0434\u043b\u044f \u043d\u0430\u0441 \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u043e \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u0437\u0430\u0431\u0435\u043a\u0430\u043f\u0438\u0442\u044c \u0433\u0438\u0444\u043a\u0438 \u0438\u0437 \u0422\u0435\u043b\u0435\u0433\u0440\u0430\u043c\u0430?<br \/>  \u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u0442\u0430\u043a\u043e\u0435 \u043d\u0435 \u0443\u043c\u0435\u044e\u0442, \u043d\u043e \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 API \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c<br \/>  \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u0434\u0435\u043b\u043e, \u0438\u0437\u0431\u0430\u0432\u0438\u0432 \u043e\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0433\u0438\u0444\u043a\u0438 \u043f\u043e \u043e\u0434\u043d\u043e\u0439.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 Go \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u0438\u0435\u043d\u0442\u0430 <a href=\"https:\/\/github.com\/gotd\/td\" rel=\"nofollow noopener noreferrer\">gotd<\/a>,<br \/>  \u0430 \u0434\u043b\u044f \u043d\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u0438\u0432\u044b\u0445 \u0434\u0430\u043c \u0441\u0440\u0430\u0437\u0443 <a href=\"https:\/\/github.com\/ernado\/telegifdl\" rel=\"nofollow noopener noreferrer\">\u0441\u0441\u044b\u043b\u043a\u0443<\/a> \u043d\u0430 \u0433\u043e\u0442\u043e\u0432\u0443\u044e \u0443\u0442\u0438\u043b\u0438\u0442\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-325956","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/325956","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=325956"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/325956\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=325956"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=325956"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=325956"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}