Newsboat: Parse "media" namespace tags in Atom feeds

Created on 31 Jul 2019  路  3Comments  路  Source: newsboat/newsboat

In some Atom feeds, e.g. from Youtube, the media namespace is used. It contains important tags like /feed/entry/media:group/media:description. It would be helpful if these were parsed and shown, too.

Example:
https://www.youtube.com/feeds/videos.xml?user=llelectronics

enhancement

Most helpful comment

@Minoru For the record, here is the Media-RSS specification that youtube and peertube use. Youtube also use its own namespace, but Media-RSS alone already provides some useful information:

An extract of youtube feed :

  <media:group>
   <media:title>Is Time Travel Impossible?</media:title>
   <media:content url="https://www.youtube.com/v/pGnMiGrYmPE?version=3" type="application/x-shockwave-flash" width="640" height="390"/>
   <media:thumbnail url="https://i1.ytimg.com/vi/pGnMiGrYmPE/hqdefault.jpg" width="480" height="360"/>
   <media:description>Sign Up on Patreon to get access to the Space Time Discord! 
https://www.patreon.com/pbsspacetime

Check out the Space Time Merch Store
https://pbsspacetime.com/

Time travel stories are cool because both the past and future are somehow more interesting that the present and because everyone wants a redo.  But so far it appears we鈥檙e doomed to live consumed by regret in the eternal, boring present. Time marches on, inexorably and only forward. Or so we thought until Einstein came along. His special and general theories of relativity changed the way we think about time forever, and believe it or not, their raw equations permit time travel. They even tell us how to do it. So let鈥檚 review the possibilities, and decide how possible they really are. [...]</media:description>
   <media:community>
    <media:starRating count="14205" average="4.93" min="1" max="5"/>
    <media:statistics views="349292"/>
   </media:community>
  </media:group>

How youtube feeds are displayed:
newsboat-youtube

An extract of peertube feed:

<media:group>
                <media:content type="application/x-bittorrent" url="https://framatube.org/static/torrents/ed5c048d-01f3-4ceb-97db-6e278de512b0-1080.torrent" isDefault="true">
                </media:content>
                <media:content type="application/x-bittorrent" url="https://framatube.org/static/torrents/ed5c048d-01f3-4ceb-97db-6e278de512b0-720.torrent">
                </media:content>
                <media:content type="application/x-bittorrent" url="https://framatube.org/static/torrents/ed5c048d-01f3-4ceb-97db-6e278de512b0-480.torrent">
                </media:content>
                <media:content type="application/x-bittorrent" url="https://framatube.org/static/torrents/ed5c048d-01f3-4ceb-97db-6e278de512b0-360.torrent">
                </media:content>
                <media:content type="application/x-bittorrent" url="https://framatube.org/static/torrents/ed5c048d-01f3-4ceb-97db-6e278de512b0-240.torrent">
                </media:content>
                <media:rating>nonadult</media:rating>
            </media:group>
            <media:thumbnail url="https://framatube.org/static/thumbnails/ed5c048d-01f3-4ceb-97db-6e278de512b0.jpg" height="122" width="223">
            </media:thumbnail>

How peertube feeds are displayed:
newsboat-peertube

All 3 comments

Can't tell anything off-hand. Need to read the spec and think how this fits into Newsboat. Thanks for the suggestion though!

Thank you for your steady work!

@Minoru For the record, here is the Media-RSS specification that youtube and peertube use. Youtube also use its own namespace, but Media-RSS alone already provides some useful information:

An extract of youtube feed :

  <media:group>
   <media:title>Is Time Travel Impossible?</media:title>
   <media:content url="https://www.youtube.com/v/pGnMiGrYmPE?version=3" type="application/x-shockwave-flash" width="640" height="390"/>
   <media:thumbnail url="https://i1.ytimg.com/vi/pGnMiGrYmPE/hqdefault.jpg" width="480" height="360"/>
   <media:description>Sign Up on Patreon to get access to the Space Time Discord! 
https://www.patreon.com/pbsspacetime

Check out the Space Time Merch Store
https://pbsspacetime.com/

Time travel stories are cool because both the past and future are somehow more interesting that the present and because everyone wants a redo.  But so far it appears we鈥檙e doomed to live consumed by regret in the eternal, boring present. Time marches on, inexorably and only forward. Or so we thought until Einstein came along. His special and general theories of relativity changed the way we think about time forever, and believe it or not, their raw equations permit time travel. They even tell us how to do it. So let鈥檚 review the possibilities, and decide how possible they really are. [...]</media:description>
   <media:community>
    <media:starRating count="14205" average="4.93" min="1" max="5"/>
    <media:statistics views="349292"/>
   </media:community>
  </media:group>

How youtube feeds are displayed:
newsboat-youtube

An extract of peertube feed:

<media:group>
                <media:content type="application/x-bittorrent" url="https://framatube.org/static/torrents/ed5c048d-01f3-4ceb-97db-6e278de512b0-1080.torrent" isDefault="true">
                </media:content>
                <media:content type="application/x-bittorrent" url="https://framatube.org/static/torrents/ed5c048d-01f3-4ceb-97db-6e278de512b0-720.torrent">
                </media:content>
                <media:content type="application/x-bittorrent" url="https://framatube.org/static/torrents/ed5c048d-01f3-4ceb-97db-6e278de512b0-480.torrent">
                </media:content>
                <media:content type="application/x-bittorrent" url="https://framatube.org/static/torrents/ed5c048d-01f3-4ceb-97db-6e278de512b0-360.torrent">
                </media:content>
                <media:content type="application/x-bittorrent" url="https://framatube.org/static/torrents/ed5c048d-01f3-4ceb-97db-6e278de512b0-240.torrent">
                </media:content>
                <media:rating>nonadult</media:rating>
            </media:group>
            <media:thumbnail url="https://framatube.org/static/thumbnails/ed5c048d-01f3-4ceb-97db-6e278de512b0.jpg" height="122" width="223">
            </media:thumbnail>

How peertube feeds are displayed:
newsboat-peertube

Was this page helpful?
0 / 5 - 0 ratings