[GH-ISSUE #119] Add Keyword Filter for Tweets #29
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TheLovinator/discord-twitter-webhooks#29
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @EthanC on GitHub (Jul 16, 2023).
Original GitHub issue: https://github.com/TheLovinator1/discord-twitter-webhooks/issues/119
In the previous version, we could filter for Tweets containing specific keywords in the search query. For example, the following query would only post Tweets to the webhook if the words "sale", "discount" or "deal" were in the Tweet body.
(sale OR discount OR deal) from:SteamThis functionality could be re-implemented in the rewrite by adding a text field containing the required keywords for a feed.
@EthanC commented on GitHub (Jul 16, 2023):
On the opposite end of the
ORsearch operator, there'sAND. This functionality would be appreciated as well. For example, the following query would only post Tweets to the webhook if the words "rust" and "deal" were in the Tweet body.(rust AND deal) from:Steam@dziban303 commented on GitHub (Jul 19, 2023):
This is really the most important feature addition for our use case. We like to track events like earthquakes, volcanic activity, tornadoes, and raspberry pi deals (one of these things is not like the other, lol); but filtering is necessary because minor quakes, EF0 tornadoes, and Pi Zeros aren't all that interesting.
@TheLovinator1 commented on GitHub (Jul 25, 2023):
Hi, sorry for not being faster with this.
I added two ways to whitelist/blacklist tweets. The first one is just checking if the string is in the tweet and the other one is using regex. I have to add a way to see what tweets gets blocked/allowed but this should be a start.
Right now I am just doing:
Should it be like this instead?
@dziban303 commented on GitHub (Jul 25, 2023):
For my purposes, the current implementation is best. I currently only have one feed configured with both white and blacklists: I want the tweets with whitelisted strings posted, unless the one blacklist word appears. If I understand correctly, the second option you mention would break that functionality and post it anyway. I can see situations where that would be useful, but I'd say leave it as-is unless someone requests it :)
We really appreciate your work on this!
@EthanC commented on GitHub (Jul 25, 2023):
The current implementation is probably best as it's simpler for the user and less work for you. Much appreciated!