ttrss_plugin-af_feedmod icon indicating copy to clipboard operation
ttrss_plugin-af_feedmod copied to clipboard

Feature Request: Regex replacements

Open ivan98 opened this issue 12 years ago • 1 comments

Feed http://appleinsider.com/appleinsider.rss pointing to article content on the main site have these anti image thief mechanism, where images are replaced by 1x1 pixel.

<div class="article-img"><img src="http://photos.appleinsider.com/v9/images/1x1-white.jpg" width="660" height="362" alt="only cost matters" class="lazy" data-original="http://cdn1.appleinsider.com/JDPower203113.png"><noscript><img src="http://cdn1.appleinsider.com/JDPower203113.png"></noscript></div>

Is it possible to run a regex replace on the content?

$articlebody=~s/<div class="article-img"><img src=".+?" (.+?) class=".+?" data-original="(.+?)"><noscript><img[^>]+><\/noscript><\/div>/<img $1 src="$2">/g;

ivan98 avatar Nov 03 '13 09:11 ivan98

Not currently. I think a separate Remove Image Dimensions Plugin would make more sense.

tewe avatar Feb 09 '14 16:02 tewe