From f76e06ec5707c72bc446d783e161512eafde22b0 Mon Sep 17 00:00:00 2001 From: Svilen Markov <7613769+svilenmarkov@users.noreply.github.com> Date: Sun, 1 Sep 2024 02:27:09 +0100 Subject: [PATCH] Fix videos widget channel URL --- internal/feed/youtube.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/internal/feed/youtube.go b/internal/feed/youtube.go index 65a5376..5016b6b 100644 --- a/internal/feed/youtube.go +++ b/internal/feed/youtube.go @@ -11,10 +11,8 @@ import ( type youtubeFeedResponseXml struct { Channel string `xml:"author>name"` - ChannelLink struct { - Href string `xml:"href,attr"` - } `xml:"link"` - Videos []struct { + ChannelLink string `xml:"author>uri"` + Videos []struct { Title string `xml:"title"` Published string `xml:"published"` Link struct { @@ -97,7 +95,7 @@ func FetchYoutubeChannelUploads(channelIds []string, videoUrlTemplate string, in Title: video.Title, Url: videoUrl, Author: response.Channel, - AuthorUrl: response.ChannelLink.Href + "/videos", + AuthorUrl: response.ChannelLink + "/videos", TimePosted: parseYoutubeFeedTime(video.Published), }) }