Skip to content

Only first image in RSS feed being parsed #103

@jk-na

Description

@jk-na

Hello,

It seems that in the case of mastodon account RSS feed items that contain multiple photos, xray is only parsing the first one. It may be that this is by design but I figured since the the photo element seems to be an array and the microformats contains multiple photos, then it perhaps isn't?

Example from actual RSS feed:

    <item>
      <title>JonathanMBR: “This progress of Mwashoti is i…”</title>
      <guid isPermalink="true">https://mstdn.social/@JonathanMBR/105865580608573320</guid>
      <link>https://mstdn.social/@JonathanMBR/105865580608573320</link>
      <pubDate>Wed, 10 Mar 2021 12:49:23 +0000</pubDate>
      <description>&lt;p&gt;This progress of Mwashoti is impressive &lt;a href="https://www.sheldrickwildlifetrust.org/orphans/mwashoti" rel="nofollow noopener noreferrer" target="_blank"&gt;&lt;span class="invisible"&gt;https://www.&lt;/span&gt;&lt;span class="ellipsis"&gt;sheldrickwildlifetrust.org/orp&lt;/span&gt;&lt;span class="invisible"&gt;hans/mwashoti&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <enclosure url="https://mstdn.social/system/media_attachments/files/105/865/577/867/652/257/original/d2fc8daa16c96d4f.jpg" length="203705" type="image/jpeg"/>
      <enclosure url="https://mstdn.social/system/media_attachments/files/105/865/578/677/055/363/original/5fbc2c67512e1381.jpg" length="300651" type="image/jpeg"/>
      <enclosure url="https://mstdn.social/system/media_attachments/files/105/865/579/531/408/158/original/074824815049fbf7.jpg" length="254773" type="image/jpeg"/>
      <enclosure url="https://mstdn.social/system/media_attachments/files/105/865/580/260/465/439/original/4f5e1b34bfba0455.jpg" length="292445" type="image/jpeg"/>
    </item>

Example snipped from equivalent xray parsed version:

            {
                "type": "entry",
                "author": {
                    "name": null,
                    "url": "https://mstdn.social/@JonathanMBR",
                    "photo": null
                },
                "uid": "https://mstdn.social/@JonathanMBR/105865580608573320",
                "url": "https://mstdn.social/@JonathanMBR/105865580608573320",
                "published": "2021-03-10T12:49:23+00:00",
                "content": {
                    "html": "<p>This progress of Mwashoti is impressive <a href=\"https://www.sheldrickwildlifetrust.org/orphans/mwashoti\">https://www.sheldrickwildlifetrust.org/orphans/mwashoti</a></p>",
                    "text": "This progress of Mwashoti is impressive https://www.sheldrickwildlifetrust.org/orphans/mwashoti"
                },
                "name": "JonathanMBR: \u201cThis progress of Mwashoti is i\u2026\u201d",
                "photo": [
                    "https://mstdn.social/system/media_attachments/files/105/865/577/867/652/257/original/d2fc8daa16c96d4f.jpg"
                ],
                "post-type": "photo"
            },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions