ttrss_plugin-af_feedmod
ttrss_plugin-af_feedmod copied to clipboard
Feature Request: Regex replacements
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;
Not currently. I think a separate Remove Image Dimensions Plugin would make more sense.