Some feeds (typically rss feeds from invidious channels) have the
following structure for entries:
<item>
[...]
<content></content>
<description>A one line title</description>
<media:group>
[...]
<media:description>An actual text
that serves
as a description</media:description>
</media:group>
</item>
If it's there, and again longer than the other fields, use it
} else {
what = item.Description
}
+ if media, ok := item.Extensions["media"]; ok {
+ if mediagroups, ok := media["group"]; ok {
+ if len(mediagroups) == 1 {
+ if mediadescription, ok := mediagroups[0].Children["description"]; ok {
+ if len(mediadescription[0].Value) > len(what) {
+ what = mediadescription[0].Value
+ }
+ }
+ }
+ }
+ }
what = strings.TrimPrefix(what, "<![CDATA[")
what = strings.TrimSuffix(what, "]]>")
h.Reset()