gugray / rss-parrot

Notifies Mastodon accounts about new posts in the RSS feeds they follow
https://rss-parrot.net
MIT License
109 stars 7 forks source link

Incorrect feed discovery on github.blog #47

Closed tabletcorry closed 5 months ago

tabletcorry commented 6 months ago

Feed discovery for github.blog appears to be incorrect, using some random person's gist feed instead?

https://rss-parrot.net/web/feeds/github.blog

Discovered: https://gist.github.com/kconner.atom

Should be

<link rel="alternate" type="application/rss+xml" title="The GitHub Blog » Feed" href="https://github.blog/feed/">
tabletcorry commented 6 months ago

And sending birb a request for the correct URL also fails, and points back to the kconner feed

gugray commented 5 months ago

This is a really weird one, and unfortunately it's Github's fault in a way that I cannot help.

In the RSS Parrot, accounts are tied to the URL of the website that has a feed; the account name is derived from the URL.

When someone requests a feed directly, then the Parrot looks inside that feed for the <link rel="alternate" type="text/html" href="https://URL-OF-SITE-TO-WHICH-FEED-BELONGS"/> tag to retrieve the site's URL.

Looking inside https://gist.github.com/kconner.atom, the tag says <link rel="alternate" type="text/html" href="https://github.blog"/>. I.e., Github is sloppy and all these different feeds just point back to the Github blog. The first time someone requested this feed, the Parrot filed it away under @github.blog@rss-parrot.net, as expected.

Now, the situation is a bit better than this because of an unrelated thing happening. I'm slowly purging accounts with 0 followers, and apparently the @github.blog account was among these. It no longer exists! So you can request the feed for https://github.blog now, and it will show the right thing.

You can also request accounts for Gist pages as long as you request the Gist itself, e.g., https://gist.github.com/kconner, and not the feed, https://gist.github.com/kconner.atom. The feed will always just give you the account of the Github blog.