Page 1 of 1

Need help - block element after specific word

Posted: Fri Sep 07, 2007 1:14 pm
by bioschaf
<h2>Telegramm
<span style="vertical-align:text-top;margin-left:160px;color:#999;font-size:9px">Anzeige</span></h2>

<table
..... AD .....
</table>


Is it possible to block the table if the word "Anzeige" shows up? Otherwise the table contains useful informations.

The best solution would be to block the <span> AND the following <table> if "Anzeige" is there...

I have no idea if you could use the text in this <span>-element.

Posted: Fri Sep 07, 2007 1:51 pm
by bioschaf
Ok... the "Anzeige" is easy to block.. I use

##SPAN[style="vertical-align: text-top; margin-left: 160px; color: rgb(153, 153, 153); font-size: 9px;"]

Is it possible to block the element that comes after it? That would be the solution

Posted: Sat Sep 08, 2007 11:03 pm
by rick752
Try this. If it doesn't work I will need to see the whole code ... preferably the page itself. It may not work because the SPAN is nested inside H2 tags ... you may have to find something BEFORE the code you are showing to properly x-path to it:

Code: Select all

##SPAN[style="vertical-align: text-top; margin-left: 160px; color: rgb(153, 153, 153); font-size: 9px;"] + TABLE:first-child
You may need:

Code: Select all

##{something before H2} + H2 + TABLE:first-child
The ":first-child" designation would only be necessary if there are 2 or more TABLES after the H2 tag (in series ... not nested inside each other). Using that would hide only the first instance of TABLE.

Posted: Sun Sep 09, 2007 11:11 pm
by bioschaf
Thank you very much. Currently, here are no adds (= "Anzeige") on the page so I can't test it.

I hope it works the way you described, because theres no way to judge from the <h2>'s

There are many headings <h2> and the only way to identify adds from normal sections is the "Anzeige" as far as I can judge.

I'll try as soon as the next add turns up ;)

Posted: Mon Sep 10, 2007 6:02 pm
by bioschaf
You were right, it does'nt work.

The site is http://www.studivz.net - somtething like facebook. You must log in to see the adds.

The code around looks like this

Code: Select all

<table class="iconsection">
<tr>
  <td class="icon"></td>
  <td class="info">
    <h2>Telegramm<span style="vertical-align:text-top;margin-left:160px;color:#999;font-size:9px">Anzeige</span></h2>
    <table border="0" cellpadding="2" width="280">
			        <tr style="border-bottom: 1px solid rgb(255, 176, 176);">
			        	<td><a href="http://ad.doubleclick.net/clk;132457196;15911281;f?http://ad.doubleclick.net/clk;125704390;18377574;m">Quatsch Dich leer für nur 25 € im Monat! Jetzt buchen und 25 € sparen!  </a>

<script language="JavaScript" type="text/javascript">
var ord; if (ord === undefined) ord = (Math.random()*10000000000000000);
</script>
<script language="javascript">
document.write('<scr'+'ipt language="javascript" src="http://ad.de.doubleclick.net/adj/studiVZ/teaser/tmob139;sz=1x1;ord=' + ord + '?"></scr'+'ipt>');
</script><noscript><a href="http://ad.de.doubleclick.net/jump/studiVZ/teaser/tmob139;sz=1x1;ord=123456789?" target="_blank"><img src="http://ad.de.doubleclick.net/ad/studiVZ/teaser/tmob139;sz=1x1;ord=123456789?" width="1" height="1" border="0" alt="" /></a></noscript></td>
			        </tr>
	</table>
  </td>
</tr>
</table>
The ids "iconsection" and "info" are used by all other tables on the site, too. It is impossible to see from the "outline" if a table contains ads or not. The other tables don't have the <span> - that's the only difference.
The ad is not always a link... in this example you could block it easily.

Posted: Mon Sep 10, 2007 11:50 pm
by rick752
Are you simply trying to block the whole next table there?

Code: Select all

##table[border="0" cellpadding="2" width="280"]
or maybe this will get everything?

Code: Select all

##td[class="icon"]:first-child + td[class="info"]

Posted: Wed Sep 19, 2007 9:42 pm
by hans wurst
i am trying to block these elements too. but they aren't set in tables on my studivz-site.

here's the code:

i want to see this:

Code: Select all

<td class="info">
      <h2>Neuigkeiten</h2>
      Klartext: <a set="yes" linkindex="30" href="http://www.studivz.net/newsroom.php?id=31&ref=0">Kaiser Chiefs vs. St. Pauli Allstars 1:2</a>

<br><br>
and block this (follows directy in the html-code):

Code: Select all

<span style="color: rgb(153, 153, 153); font-size: 9px;">Anzeige</span><br>
<a linkindex="31" href="http://ad.doubleclick.net/clk;137007869;15911281;i?http://www.studivz.net/group.php?ids=0abac82d7d0ff4ce">Besser Sex für Geld als kein Sex und kein Geld
</a> <br>
<span style="color: rgb(69, 69, 69); font-size: 10px;">Gewinne Deine STELLUNGSWECHSEL Privatvorstellung mit 50 Freunden

</span><br>
<script language="JavaScript" type="text/javascript">
var GWP_ord; if (GWP_ord === undefined) GWP_ord = (Math.random()*10000000000000000);
</script>
<script language="javascript">
document.write('<scr'+'ipt language="javascript" src="http://ad.de.doubleclick.net/adj/studiVZ/teaser/fox199;sz=1x1;ord=' + GWP_ord + '?"></scr'+'ipt>');
</script><script style="display: none;" language="javascript" src="http://ad.de.doubleclick.net/adj/studiVZ/teaser/fox199;sz=1x1;ord=1668942870325068.5?"></script><noscript>
<a href="http://ad.de.doubleclick.net/jump/studiVZ/teaser/fox199;sz=1x1;ord=123456789?" target="_blank"><img 
src="http://ad.de.doubleclick.net/ad/studiVZ/teaser/fox199;sz=1x1;ord=123456789?" width="1" height="1" border="0" alt="" 
/></a></noscript>


<br>
that part is repeated with other ads like this:

Code: Select all

<span style="color: rgb(153, 153, 153); font-size: 9px;">Anzeige</span><br>
<a linkindex="32" href="http://ad.doubleclick.net/clk;134011642;15911281;p?http://www.studivz.net/l/familyone">Deine eigene Webseite:<br>  Du entscheidest wer deine Fotos & Videos sehen darf </a>

<script language="JavaScript" type="text/javascript">
var GWP_ord; if (GWP_ord === undefined) GWP_ord = (Math.random()*10000000000000000);
</script>
<script language="javascript">
document.write('<scr'+'ipt language="javascript" src="http://ad.de.doubleclick.net/adj/studiVZ/teaser/fo18199;sz=1x1;ord=' + GWP_ord + '?"></scr'+'ipt>');
</script><script style="display: none;" language="javascript" src="http://ad.de.doubleclick.net/adj/studiVZ/teaser/fo18199;sz=1x1;ord=1668942870325068.5?"></script><noscript><a href="http://ad.de.doubleclick.net/jump/studiVZ/teaser/fo18199;sz=1x1;ord=123456789?" target="_blank"><img src="http://ad.de.doubleclick.net/ad/studiVZ/teaser/fo18199;sz=1x1;ord=123456789?" width="1" height="1" border="0" alt="" /></a></noscript>

<br><br>
i managed to hide the <span> and <a>-tags by attribute-identifiers, but i can't get rid of the part.

Code: Select all

document.write('<scr'+'ipt language="javascript" src="http://ad.de.doubleclick.net/
any ideas on that?

Posted: Wed Sep 19, 2007 9:59 pm
by MonztA
There is a working login for http://www.studivz.net on bugmenot.com. Anybody who wants to help can login.