diff --git a/bot.go b/bot.go index e9c4f80..d27b7db 100644 --- a/bot.go +++ b/bot.go @@ -20,8 +20,8 @@ const ( // Quote represent a quote of the flim type Quote struct { - Quote string `json:"quote"` - Page string `json:"page"` + Quote string `json:"quote"` + Page string `json:"page"` ThumbURL string `json:"thumb_url"` } @@ -84,7 +84,7 @@ func main() { // Cite command b.Handle("/cite", func(m *tb.Message) { quotes, err := index.Search(m.Text) - if err != nil || len(quotes) == 0{ + if err != nil || len(quotes) == 0 { b.Send(m.Chat, "Pas de citation trouvée") return } @@ -152,9 +152,9 @@ func Update() error { videos = append( videos, Quote{ - Quote: e.ChildAttr("img", "alt"), + Quote: e.ChildAttr("img", "alt"), ThumbURL: e.ChildAttr("img", "data-original"), - Page: e.ChildAttr("a", "href"), + Page: e.ChildAttr("a", "href"), }, ) }) diff --git a/index.go b/index.go index a6e377e..106cd07 100644 --- a/index.go +++ b/index.go @@ -9,8 +9,8 @@ import ( // QuoteIndex index of quotes type QuoteIndex struct { - index bleve.Index - Videos []Quote + index bleve.Index + Videos []Quote videoByPage map[string]Quote //videoByPage[youtubeKey] }