Skip to content
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

Fixed(Add-Content): Extend Webpage Detection to Include RSS Feeds Based on Content-Type Check #2158

Merged
merged 3 commits into from
Sep 26, 2024

Conversation

MuhammadUmer44
Copy link
Contributor

@MuhammadUmer44 MuhammadUmer44 commented Sep 18, 2024

Problem:

  • Feeds like this should work: https://rss.arxiv.org/rss/cs.AI
  • If RSS is not picked up by regex check but is identified as a wevpage, add an additional check on all webpages for RSS feeds.
  • Extend check for type = application/rss+xml

Issue ticket number and link:

closes: #2156

image

@MuhammadUmer44 MuhammadUmer44 force-pushed the Extend-webpage-check-rss-feeds branch 3 times, most recently from 9016bd1 to 7fdc308 Compare September 18, 2024 16:21
@MuhammadUmer44 MuhammadUmer44 force-pushed the Extend-webpage-check-rss-feeds branch 3 times, most recently from 82f3c87 to dcbfb1c Compare September 18, 2024 23:44
@MuhammadUmer44
Copy link
Contributor Author

Hi @Rassl, Please review this PR.

@@ -25,7 +25,18 @@ const genericUrlRegex = /^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/
const twitterBroadcastRegex = /https:\/\/twitter\.com\/i\/broadcasts\/([A-Za-z0-9_-]+)/
const githubRepoPattern = /https:\/\/github\.com\/[\w-]+\/[\w-]+/

export function getInputType(source: string) {
export async function checkIfRSS(url: string): Promise<boolean> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting solution 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Man!

@Rassl Rassl merged commit ade6324 into stakwork:master Sep 26, 2024
16 of 22 checks passed
@tomsmith8
Copy link
Contributor

https://rss.arxiv.org/rss/stat.ML

This should be picked up right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend webpage check for RSS feeds
3 participants