diff --git a/mastodon.go b/mastodon.go index f3e7ed0..b2fde05 100644 --- a/mastodon.go +++ b/mastodon.go @@ -160,15 +160,15 @@ func parseMicroformats(r io.Reader) (*MastoFeed, error) { } feed.Title = doc.Find(".h-feed > .p-name").First().AttrOr("value", "") doc.Find(".h-feed").Find(".h-entry, .h-cite").Each(func(i int, elem *goquery.Selection) { - cw := strings.TrimSpace(text(elem.Find(".p-summary"))) + cw := strings.TrimSpace(text(elem.Find(".p-summary").First())) if cw != "" { cw = "[" + cw + "] " } feed.Items = append(feed.Items, &MastoItem{ Title: "", - Content: cw + text(elem.Find(".e-content")), + Content: cw + text(elem.Find(".e-content").First()), Link: elem.Find("a.u-url.u-uid").AttrOr("href", ""), - Author: text(elem.Find(".p-author .p-name")), + Author: text(elem.Find(".p-author .p-name").First()), PublishedString: elem.Find("data.dt-published").AttrOr("value", ""), IsBoost: elem.HasClass("h-cite"), })