Yahoo Pipes: filter items in a feed based on words

2019-05-21 04:50发布

I have a pipe that filters an RSS feed and removes any item that contains "stopwords" that I've chosen. Currently I've manually created a filter for each stopword in the pipe editor, but the more logical way is to read these from a file. I've figured out how to read the stopwords out of the text file, but how do I apply the filter operator to the feed, once for every stopword?

The documentation states explicitly that operators can't be applied within the loop construct, but hopefully I'm missing something here.

2条回答
Emotional °昔
2楼-- · 2019-05-21 05:33

You're not missing anything - the filter operator can't go in a loop.

Your best bet might be to generate a regex out of the stopwords and filter using that. e.g. generate a string like (word1|word2|word3|...|wordN).

You may have to escape any odd characters. Also I'm not sure how long a regex can be so you might have to chunk it over multiple filter rules.

查看更多
唯我独甜
3楼-- · 2019-05-21 05:33

In addition to Gavin Brock's answer the following Yahoo Pipes filters the feed items (title, description, link and author) according to multiple stopwords:

Inputs

查看更多
登录 后发表回答