aaronpk / XRay

X-Ray returns structured data from any URL
https://xray.p3k.app
MIT License
90 stars 15 forks source link

Recognize RSS feeds without an opening `<?xml` tag #89

Closed martymcguire closed 4 years ago

martymcguire commented 5 years ago

This feed: https://every-layout.dev/feed.xml

Advertises itself as an RSS 2.0 feed and loads up fine in a browser. XRay treats it as unknown (found via subscribing with Aperture turning up 0 items).

The W3C feed validator says the dates in there are invalid, which seems true!

If this is what XRay is tripping on... can XRay be more forgiving?

aaronpk commented 4 years ago

So it turns out this feed doesn't start with the normal <?xml declaration, which is how XRay was recognizing something as XML. I've added some additional checks for this case.