-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter out irrelevant feed URLs #3780
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Blogspot
URLs still return an extra feedUrl that I'm not sure if we need.
Maybe cc @humphd can clarify this.
- Wordpress:
Before:
{
"feedUrls": [
{
"feedUrl": "https://neilong31.wordpress.com/feed/",
"type": "blog"
},
{
"feedUrl": "https://neilong31.wordpress.com/comments/feed/",
"type": "blog"
},
{
"feedUrl": "https://public-api.wordpress.com/oembed/?format=json&url=https%3A%2F%2Fneilong31.wordpress.com%2F&for=wpcom-auto-discovery",
"type": "blog"
},
{
"feedUrl": "https://public-api.wordpress.com/oembed/?format=xml&url=https%3A%2F%2Fneilong31.wordpress.com%2F&for=wpcom-auto-discovery",
"type": "blog"
}
]
}
After
{
"feedUrls": [
{
"feedUrl": "https://neilong31.wordpress.com/feed/",
"type": "blog"
}
]
}
- Blogspot
Before
{
"feedUrls": [
{
"feedUrl": "https://whataboutopensource.blogspot.com/feeds/posts/default",
"type": "blog"
},
{
"feedUrl": "https://whataboutopensource.blogspot.com/feeds/posts/default?alt=rss",
"type": "blog"
},
{
"feedUrl": "https://www.blogger.com/feeds/6561714874239648778/posts/default",
"type": "blog"
}
]
}
After
{
"feedUrls": [
{
"feedUrl": "https://whataboutopensource.blogspot.com/feeds/posts/default",
"type": "blog"
},
{
"feedUrl": "https://whataboutopensource.blogspot.com/feeds/posts/default?alt=rss",
"type": "blog"
}
]
}
So it's giving both Atom and RSS versions of the feed. I guess we could filter out the |
Yea, I ended up leaving the atom or rss versions in. I can add another filter to remove the |
Add tests for feed URL filtering Add filter for blogpost.com alterate rss feed
2ca4cb4
to
62c5eba
Compare
I have added a filter to skip the |
@manekenpix let me know if you want to review this, otherwise I'll merge this week. |
Issue This PR Addresses
Resolves #3688
Type of Change
Description
The feed discovery services can return feed URLs that are not relevant. One such example is the wordpress.com's comments feed:
https://blog.wordpress.com/comments/feed
.We want to filter out the irrelevant URLs for four hosts -
dev.to
,medium.com
,wordpress.com
,blogspot.com
.This PR adds filters to remove the following:
rss+xml
feed url. So, we skip thejson+oembed
feed urlservice.post
url - There are two other feed urls foratom+xml
andrss+xml
which are returnedSteps to test the PR
Checklist