Remove SPAM from RSS feeds

So I have been unsuccessfully trying to remove some of the SPAM from the Google News Searches. There are spammers that post from the same information day in and day out for fake “reports”. They keep refreshing their data all the time, so Google News for me catches it a few hundred times as I look for certain companies in the news.

I have tried a smart folder and using “Name” “does not contain” “keywords”, but it does not work for me. Is there a way to remove, delete, or whatever using keywords in name from RSS feeds?

When is the smart rule triggered?

I was doing this inside the folder, but am now putting this in a rule and it works. Thank you!

So currently I am using this for work to track various companies in Google News Search, but unfortunately, there are a ton of these new SPAM domains being registered to drive people to some documents to download for malware or to scam people.

The rules are getting VERY long.

So the rule I am using is “URL” + “begins with” + “URL” and then Delete.

So since the URL list is really long now, I am not sure if there is a limit, or detrimental effect if the rule is performed on demand. I am also thinking if there is a way to feed this data from a file (preferably internal) that could fit the list of the URL’s to DevonThink rule?

If anyone has other suggestions I will be glad to take them, unfortunately, I need the Google News information, and data to do my job.

The only alternative would be to use a script in your rule. And this script could use a list of the URLs to filter.

1 Like

Any example of a script that does something similar. I just need an example that looks something up, or removes something and I will adjust accordingly. I can handle scripts but it will be easier if I start with something.

A basic & untested script could look like this:


property excludedURLs : {"myspamhost1.com", "andevenmorespam.tv"}

on performSmartRule(theRecords)
	tell application id "DNtp"
		repeat with theRecord in theRecords
			set theURL to URL of theRecord
			repeat with excludedURL in excludedURLs
				if theURL contains excludedURL then
					delete record theRecord
					exit repeat
				end if
			end repeat
		end repeat
	end tell
end performSmartRule

The smart rule requires at least the condition Kind is News, the action Execute Script > AppleScript and could be triggered On News.

1 Like