cahnge git server and fixed time parsing

This commit is contained in:
2025-10-06 12:21:22 +03:00
parent 970f6c2bfd
commit 1544b943fc
11 changed files with 108 additions and 52 deletions

View File

@@ -7,19 +7,19 @@ import (
"strconv"
"strings"
"github.com/dromara/carbon/v2"
"github.com/emersion/go-imap/v2"
"github.com/go-shiori/dom"
"github.com/golang-module/carbon/v2"
"github.com/jmoiron/sqlx"
"github.com/spf13/viper"
"golang.org/x/net/html"
"git.amok.space/yevhen/resource-scraper/helper/parser"
"git.amok.space/yevhen/resource-scraper/helper/sugar"
"git.amok.space/yevhen/resource-scraper/internal/mail"
_table "git.amok.space/yevhen/resource-scraper/pkg/repository/table"
"git.amok.space/yevhen/resource-scraper/types/constant"
"git.amok.space/yevhen/resource-scraper/types/model"
"git.kplus.net.ua/yevhen/resource-scraper/helper/parser"
"git.kplus.net.ua/yevhen/resource-scraper/helper/sugar"
"git.kplus.net.ua/yevhen/resource-scraper/internal/mail"
_table "git.kplus.net.ua/yevhen/resource-scraper/pkg/repository/table"
"git.kplus.net.ua/yevhen/resource-scraper/types/constant"
"git.kplus.net.ua/yevhen/resource-scraper/types/model"
)
type ShareTheBrutality struct {
@@ -47,7 +47,10 @@ func (s *ShareTheBrutality) GetMail(email string) ([]model.ExternalSources, *mai
//now := carbon.Now()
s.EmailService.ListMessages(viper.GetStringSlice(mailboxes), searchCriteria)
//box.CreateMailbox("INBOX/Processed")
//s.EmailService.CreateMailbox("Processed")
//s.EmailService.CreateMailbox("Succeed")
//s.EmailService.CreateMailbox("Processed/Succeed")
//s.EmailService.DeleteMailbox("Processed")
//s.EmailService.CreateMailbox("Processed/Failed")
//s.EmailService.CreateMailbox("Processed/Suspicious")
//s.EmailService.MailboxesList()
@@ -131,7 +134,8 @@ func (s *ShareTheBrutality) Processing(sender map[string]string) []model.Externa
}
es.Releaser = sourceDataMatch[1]
es.Created = carbon.Parse(msg.Envelope.Date.String())
es.Created = carbon.Parse(msg.Envelope.Date.String(), "Europe/Kyiv")
es.Type = dbType
genre := strings.ToLower(sourceDataMatch[2])