Skip to content
This repository has been archived by the owner on Jul 13, 2021. It is now read-only.

Feature Request: Regex replacements #24

Open
ivan98 opened this issue Nov 3, 2013 · 1 comment
Open

Feature Request: Regex replacements #24

ivan98 opened this issue Nov 3, 2013 · 1 comment

Comments

@ivan98
Copy link

ivan98 commented Nov 3, 2013

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;
@tewe
Copy link

tewe commented Feb 9, 2014

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants