How do I block fixed size images

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
Locked
flurryman
Posts: 4
Joined: Wed Feb 24, 2016 6:41 pm

How do I block fixed size images

Post by flurryman »

Hi,

on a specific web site I see banners that are simple .jpgs with a simple URL which is dynamically generated on each visit, with rotating sub-banners. Since the images are in the same URL path as the "important" images you cannot simply select by path. But the size of these ad jpgs is always the same, without width= and height= elements.

The question is, how do I catch images of a given size when there are no size elements... ?

TIA!
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: How do I block fixed size images

Post by mapx »

browser ?
ABP version ?

provide page link and tell me what do you want to block / hide
flurryman
Posts: 4
Joined: Wed Feb 24, 2016 6:41 pm

Re: How do I block fixed size images

Post by flurryman »

Browser: Chrome 48.0.2564.116 on Ubuntu 14.04.3
ABP: 1.10.1

Web page: http://www.spiegel.de subpages, e.g. http://www.spiegel.de/gesundheit/diagno ... 79335.html. I am referring to the 300x250 pixel 3-banner ad that is located at the 2nd or 3rd paragraph of the text. These 3-fold banners are generated on the fly as well as the links pointing to them, but they seem to always be 300x250 px, and the URL always seems to start with http://cdn?.spiegel.de/images/image- . The point is that the "useful" images on this page begin with the same URL "root" but they usually have different sizes. The HTML code contains no width= or height=, hence the banners are displayed in their native size.
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: How do I block fixed size images

Post by mapx »

try

Code: Select all

||cdn2.spiegel.de/images/image-*-thumb-
or

Code: Select all

spiegel.de##DIV > SPAN > A > IMG[src^="http://cdn2.spiegel.de/images/"]
spiegel.de##DIV > DIV > A > IMG[src^="http://cdn2.spiegel.de/images/"]
flurryman
Posts: 4
Joined: Wed Feb 24, 2016 6:41 pm

Re: How do I block fixed size images

Post by flurryman »

Code: Select all

spiegel.de##DIV > SPAN > A > IMG[src^="http://cdn*.spiegel.de/images/image-*"]
does the trick. For 1 or 2 seconds, after which the web server appears to notice that something is going on, and pushes a reload, after which the image is there again. They appear to have found a way to circumvent the element hiding rule. :evil:

Which leads me back to the question, how can I block fixed size images... maybe element hiding is not the right way to do it, in this special case. Others may jump on the bandwagon, though.
User avatar
mapx
Posts: 21940
Joined: Thu Jan 06, 2011 2:01 pm

Re: How do I block fixed size images

Post by mapx »

Did you try my filters ?

this 1 is a wrong hiding filter (you can not use wildcards):
spiegel.de##DIV > SPAN > A > IMG[src^="http://cdn*.spiegel.de/images/image-*"]
flurryman
Posts: 4
Joined: Wed Feb 24, 2016 6:41 pm

Re: How do I block fixed size images

Post by flurryman »

Ah thank you, I wasn't aware of the "no wildcard" limitation.

This one seems to work now - images can be on either server.

Code: Select all

spiegel.de##DIV > SPAN > A > IMG[src^="http://cdn1.spiegel.de/images/"]
spiegel.de##DIV > SPAN > A > IMG[src^="http://cdn2.spiegel.de/images/"]
I'll see if your 2nd rule will be needed on top.

THX so far!
Locked