Hi everybody,

I am trying to find a module that would find a certain text (link) in a node and replace it (actually delete part of it). But it is a bit advanced replacement.

I have a feed from Google News but the articles in the feed are linked through google. I need to get rid of this first part of the link and stay only with the direct link to the site. The problem is also that the google part of the link has some variables. Generally I need to achieve this:

http://news.google.com/news/url?sa=T&ct=cz/0-0&fd=R&url=http://www.examp... --> http://www.example1.com

http://news.google.com/news/url?sa=T&ct=cz/3-0&fd=R&url=http://www.examp... --> http://www.example2.com

http://news.google.com/news/url?sa=T&ct=cz/1-0&fd=R&url=http://www.examp... --> http://www.example3.com

I use FeedAPI module for the rss feed. This module should be able to recognize duplicate posts and thus not to add them to the site so that's why I need clean links.

Is there any module or a script that could do this work?

Thanks for your help

Tom

Comments

WorldFallz’s picture

That's called a 'filter' in drupalspeak-- you might be able to do this with the http://drupal.org/project/flexifilter module.

===
"Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime." - Lao Tzu
"God helps those who help themselves." - Ben Franklin
"Search is your best friend." - Worldfallz