DEV Community

Eakam
Eakam

Posted on • Updated on

Telescope - filtering feed URLs - planning

I am working on an issue in telescope to only return relevant feed URLs when given a blog URL. During the sign-up process, users provide a blog URL, which is used to find and show a list of blog feed URLs. The user can select one or more of these, which are then used to display the blog posts for the user:

Blog URL form

However, some of these feed URLs are not relevant, such as the comments feed for WordPress: https://<user>.io/comments/feed. This needs to be changed so that only the relevant feed URLs are returned.

I already know a bit about how the process of getting feed URLs from a blog URL works since I have worked on the feed discovery service in the past. The response for a blog URL includes has <link> tags for various feed URLs.

So, to implement the filtering feature, I would first need to identify the types of feed URLs that are returned by various blog hosts, and then decide which ones are relevant and should be kept. I do not know much about the types of feed URLs there could be. So, my initial plan is to use regular expressions to match the common patterns among the ones that should not be kept. For example, we do not want any feed URLs that have the word comments in them.

Once the filtering rules are determined, I would simply need to add a new function (and some tests for the new filtering logic) to filter the URLs before displaying them to the user.

Top comments (0)