Riduidel / mastodon-rss

A toy project trying to fetch my Mastodon "timeline" as RSS
GNU General Public License v3.0
2 stars 0 forks source link

Images are not embedded in messages #6

Closed Riduidel closed 1 year ago

Riduidel commented 1 year ago

There are sometimes images in RSS feeds, which are embedded as media enclosures. See this example

    <item>
      <title>Nov 11, 2022, 21:21</title>
      <guid isPermaLink="true">https://techhub.social/@R_P_one/109327267725352059</guid>
      <link>https://techhub.social/@R_P_one/109327267725352059</link>
      <pubDate>Fri, 11 Nov 2022 21:21:57 +0000</pubDate>
      <description>&lt;p&gt;A comment I made at INEC 2022 that seemed to be well received was that the green energy revolution may be greatest opportunity for NATO nations to regain energy security. Both by reducing reliance on antagonistic regimes, and by increasing resilience at home. I sense some student projects to get a handle on the numbers!&lt;/p&gt;</description>
      <media:content url="https://files.techhub.social/media_attachments/files/109/327/255/700/857/956/original/5abf9f9847cdacbb.png" type="image/png" fileSize="91666" medium="image">
        <media:rating scheme="urn:simple">nonadult</media:rating>
      </media:content>
      <media:content url="https://files.techhub.social/media_attachments/files/109/327/257/907/380/155/original/e56b93d8b17e5f18.png" type="image/png" fileSize="159923" medium="image">
        <media:rating scheme="urn:simple">nonadult</media:rating>
        <media:description type="plain">Illustration of a submarine recharging batteries from an offshore wind turbine.</media:description>
      </media:content>
    </item>

media namespace is xmlns:media="http://search.yahoo.com/mrss/"

Riduidel commented 1 year ago

Done!