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

Regex to remove certain strings fromn rss #2830

Open
robotfx opened this issue Jul 3, 2020 · 3 comments
Open

Regex to remove certain strings fromn rss #2830

robotfx opened this issue Jul 3, 2020 · 3 comments

Comments

@robotfx
Copy link

robotfx commented Jul 3, 2020

I"d like to know if itis possible to remove certain strings from rss feeds. I am trying to use huggin on heroku, to combine a few feeds into one, like yahoopipes used to. That works fine, but I do need some things removed, like for example img alts, img captions etc. If this is possible, I haven't been able to find info about it. Please help

@dsander
Copy link
Collaborator

dsander commented Jul 12, 2020

There most probably is a way to do it, pipe the Events to a ManualEventAgent and use one of the liquid regular expression filters.

@robotfx
Copy link
Author

robotfx commented Jul 19, 2020

Sorry, it's a little above my head. My diagram looks like below, but I have no idea what to enter the ManualEventsAgent.
b1b963ef-e0c7-4e9d-a7ac-db76bc2bf23c
The RSS is a collection of my favorite feeds, the Output if simply sorting them by date and displaying them properly.
Ideally, I'd like the links removed, and therefore looking for a regex (probably) to delete everything from. and including
<a ... /a>
Can you please post here what the content of the ManualEventAgent should be in order to accomplish this?
Thank you.

@dsander
Copy link
Collaborator

dsander commented Jul 21, 2020

Something like this (no need to adjust the regular expression based on the data you are receiving:

{
  "instructions": {
    "some_other_field": "{{ content | regex_replace: \"\\x22(.*?)\\x22\", \"\" }}"
  },
  "matchers": [],
  "mode": "merge"
}

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

No branches or pull requests

2 participants