Post Reply 
Block all youtube ads with Exceptions -U entry.
Dec. 26, 2013, 07:50 PM (This post was last modified: Mar. 01, 2014 04:20 AM by Belarathon.)
Post: #1
Block all youtube ads with Exceptions -U entry.
Adding the following to Exceptions-U kills youtube ads:

Code:
s0.2mdn.net/$RDIR(http://local.ptron/killed.gif)
s1.2mdn.net/$RDIR(http://local.ptron/killed.gif)
s2.youtube.com/$RDIR(http://local.ptron/killed.gif)
googleads.g.doubleclick.net/$RDIR(http://local.ptron/killed.gif)

UPDATE 12/28/13:

If you want to block video annotations (the author driven, descriptive pop-up overlays), add the following to Exceptions-U:

Code:
www.youtube.com/annotations_invideo?[a-z0-9]+$RDIR(http://local.ptron/killed.gif)

UPDATE 02/28/14:

If you use the Sidki filter set and find that thumbnails in YouTube search results fail to load, add this to Exceptions-U, thanks to JJoe:

Code:
www.youtube.com/results?search_query $SET(0=a_adjsex.)
Add Thank You Quote this message in a reply
Dec. 27, 2013, 03:41 AM
Post: #2
RE: Block all youtube ads with Exceptions -U entry.
why are you using a list named exceptions to block ads?

try blocking 's.youtube.com' to get rid of youtube ads.
I don't know what annotations you mean. a direct link would be helpful.

why not blocking 'doubleclick.net' in general? I don't think that domain sends anything useful to humankind.
Add Thank You Quote this message in a reply
Dec. 27, 2013, 04:22 AM (This post was last modified: Dec. 27, 2013 04:39 AM by Belarathon.)
Post: #3
RE: Block all youtube ads with Exceptions -U entry.
(Dec. 27, 2013 03:41 AM)neverwasinparis Wrote:  why are you using a list named exceptions to block ads?

That's the only way I could get it to actually block the ads.

Quote:try blocking 's.youtube.com' to get rid of youtube ads.
I don't know what annotations you mean. a direct link would be helpful.

And how exactly would you do that?
In other words, the user driven overlay descriptive bubbles that appear over videos (not ads).

http://www.youtube.com/watch?v=C5zzVemi3m4
Quote:why not blocking 'doubleclick.net' in general? I don't think that domain sends anything useful to humankind.

If you can block doubleclick.net by adding to adDomains, (or anywhere else) I'm all ears. I haven't been successful.
Add Thank You Quote this message in a reply
Dec. 27, 2013, 05:17 AM
Post: #4
RE: Block all youtube ads with Exceptions -U entry.
(Dec. 27, 2013 04:22 AM)Belarathon Wrote:  That's the only way I could get it to actually block the ads.

By default Sidki's set filters the browser's html for urls not headers.
This means that flash, obfuscated html, etc may avoid the filters.
Your Exceptions entries, however, are targeting headers.

Enabling
!-|||||||||||| URL: Block Ad URLs 06.08.10 [srl] (o.3) (Out)
will cause the Proxomitron to target headers.

I also use Exceptions entries with sidki's. When necessary, it is the intended use.

neverwasinparis Wrote:I don't think that domain sends anything useful to humankind.

Not sure about now but it (domain and servers) did, unfortunately.
Add Thank You Quote this message in a reply
Dec. 27, 2013, 05:23 AM (This post was last modified: Dec. 27, 2013 05:56 AM by neverwasinparis.)
Post: #5
RE: Block all youtube ads with Exceptions -U entry.
ah, these annotations. you can use YouTube Options extension to block them. contains a lot of other useful options. works also on encrypted version of YouTube.

I block doubleclick.net since years without recognising any problems. but you have to redirect 'crossdomain.xml' file of any subdomain to local.ptron that contains this 'crossdomain.xml' file or on some other sites videos will not start cause of bad web design. doubleclick.net is a very large (the largest?) ad network. so it's worth it to not disturb these servers.
Add Thank You Quote this message in a reply
Feb. 25, 2014, 04:20 PM
Post: #6
RE: Block all youtube ads with Exceptions -U entry.
UPDATE:

Refer to the original post to fix broken thumbnails in YouTube search results. It involves commenting out an entry in AdPaths.ptxt.
Add Thank You Quote this message in a reply
Feb. 26, 2014, 08:02 PM
Post: #7
RE: Block all youtube ads with Exceptions -U entry.
(Dec. 26, 2013 07:50 PM)Belarathon Wrote:  If you use the Sidki filter set and find that thumbnails in YouTube search results fail to load, you can comment out the following filter in "adPaths.ptxt" to remedy the situation, as I have shown below. I've found no adverse effects from it's removal.

Do this as a last resort, please. Your solution will allow more ads (which may be adverse) and make troubleshooting more difficult.

I can't find any missing search page thumbnails due to filter matches and AdPaths. So I can't test.

Rather than "comment out" what happens after you enable
- On-Domain Ad Paths 10.10.16 (fail) [srl] (o.1)
under HTML Web Page Filters.
?

Could also use
## allow ad paths on current domain $SET(1=adpath:0.)
or other keywords in Exceptions -U.
Add Thank You Quote this message in a reply
Feb. 26, 2014, 08:24 PM (This post was last modified: Feb. 27, 2014 02:19 AM by Belarathon.)
Post: #8
RE: Block all youtube ads with Exceptions -U entry.
(Feb. 26, 2014 08:02 PM)JJoe Wrote:  Could also use
## allow ad paths on current domain $SET(1=adpath:0.)
or other keywords in Exceptions -U.

I thought I had tried that, but I'll verify. Obviously that would be a better solution.

EDIT: I tried this this afternoon - it did not work. In fact, I worked on this issue, I actually went down the list of exception examples in the Exceptions-U file and tried ALL of them. None worked. That is, none that wouldn't also allow undesireable embedded ads. It was then that I systematically commented out each hit in the Proxo log of a blocked doman, path etc. until I found the entry that prevented thumbnail retrieval. It was the one listed above.
Add Thank You Quote this message in a reply
Feb. 27, 2014, 10:36 PM
Post: #9
RE: Block all youtube ads with Exceptions -U entry.
(Feb. 26, 2014 08:24 PM)Belarathon Wrote:  
(Feb. 26, 2014 08:02 PM)JJoe Wrote:  Could also use
## allow ad paths on current domain $SET(1=adpath:0.)
or other keywords in Exceptions -U.

I thought I had tried that, but I'll verify. Obviously that would be a better solution.

EDIT: I tried your solution this afternoon - it did not work. In fact, I when I worked on this issue, I actually went down the list of exception examples in the Exceptions-U file and tried ALL of them. None worked. That is, none that wouldn't also allow undesireable embedded ads. It was then that I systematically commented out each hit in the Proxo log of a blocked doman, path, etc., until I found the entry that prevented thumbnail retrieval. It was the one listed above.
Add Thank You Quote this message in a reply
Feb. 27, 2014, 10:50 PM
Post: #10
RE: Block all youtube ads with Exceptions -U entry.
Sorry for the delay. Just noticed the edit.

(Feb. 26, 2014 08:24 PM)Belarathon Wrote:  EDIT: I tried this this afternoon - it did not work.

I am and was willing to take a look but I need to know more details. Smile!

Page's address, search terms, which browser, may need your location?

mail is fine.

(Feb. 26, 2014 08:24 PM)Belarathon Wrote:  I actually went down the list

Sorry, I didn't want you to go through all that.

I'd probably start by trying to open just the image.
If it opens, I'd check the html that calls the image for errors due to the Proxomitron, like Proxomitron's dbug or the browser's inspection tools.
If it doesn't, I'd check the headers for errors due to the Proxomitron.
After I find the errors, the filters responsible are frequently obvious.
Then I have to decide how to allow the code to pass or not.

Now, I do see some thumbnails that are not loading but they do on reload. Commenting out the AdPaths entry does not fix this for me.
Add Thank You Quote this message in a reply
Feb. 27, 2014, 11:40 PM (This post was last modified: Feb. 28, 2014 03:43 AM by Belarathon.)
Post: #11
RE: Block all youtube ads with Exceptions -U entry.
Quote:Sorry, I didn't want you to go through all that.

That's alright - it's something I tried weeks ago while trying to resolve the issue, before I went through the log and found the offending adPath line.

Usually, the first page of thumbnails loads completely, but only half of them on the second page of search returns. It's rather a strange issue. It must be a consequence of blocking doubleclick.


Edit: Yep....it's the doubleclick portion of

Code:
#ad((id(^$TST(\3=n)(^$TST(\9=.)))|fu|js|s(x|(^=[^1-9]|(^?)))|vt
  |v($TST(\9=[/.])(^$TST(\3=c|:))|[0-9]|(^[^/.]))|x)([0-9][a-z0-9]+|)
  |[#0:*](^-)|(^$TST(\3={)|\=|/$TST(\3=>)|-(bin|hoc|lib)|.doubleclick))
#  &&\8&($TST(volat=*.log:[12]*)$ADDLST(Log-Rare,ALST AdP \8\t\u)|)

If you remove "|.doubleclick))" from the entry, the thumbnails will load. Now if I do that, do I need to have double parenthesis after the following part to close it?

Code:
(bin|hoc|lib)

Like so?

Code:
(bin|hoc|lib))

I tried it both ways, and the thumbnails load either way. I just want to make sure subtracting doubleclick from the entry doesn't break the rest of the code. I'm just extrapolating, but wouldn't the doubleclick portion be superfluous since this exists in adDomains.ptxt?

Code:
doubleclick(^.net/(clk;|pfadx/)|$TST(\3=.|ø))

Thanks.
Add Thank You Quote this message in a reply
Feb. 28, 2014, 05:50 AM (This post was last modified: Mar. 01, 2014 05:30 AM by JJoe.)
Post: #12
RE: Block all youtube ads with Exceptions -U entry.
(Feb. 27, 2014 11:40 PM)Belarathon Wrote:  wouldn't the doubleclick portion be superfluous since this exists in adDomains.ptxt?

No. The path is the part of the address after the first /. The domain is before the first /.

From what I can see AdPaths is only responsible for

Code:
<Match: <script> Block: Scripts by URL     10.10.16 [pr] (d.2) >
<script id="js-1933359786" class="www-search-ads" src="//s.ytimg.com/yts/jsbin/www-search-ads-vflSVjLXY.js" data-loaded="true">
</Match>

on www.youtube.com/results?search_query . After I add

Code:
www.youtube.com/results\?search_query $SET(0=a_adjsex.)

to Exceptions-U, IE11 works as youtube wants.

Does this entry solve your problem?

Youtube (and other sites) is trying to deliver content as needed. The thumbnails may not load until they can be seen.

My version of chrome does not do this well with a direct connection. If I wait too long before I begin scrolling the page at youtube, the thumbnails on the rest of the page do not load. Reloading the page while the page is scrolled to the bottom loads all the thumbnails. Same behaviour with sidki's set filtering.

My Palemoon seems to work as youtube wants. With or without the Proxomitron.

IE11 works as youtube wants direct. Worked like my chrome with the Proxomitron filtering until I added the exception.

HTH

Edit: ? to \? in list expression. Best practice.
Add Thank You Quote this message in a reply
Mar. 01, 2014, 04:18 AM
Post: #13
RE: Block all youtube ads with Exceptions -U entry.
(Feb. 28, 2014 05:50 AM)JJoe Wrote:  Does this entry solve your problem?

So far so good! Thanks.
Add Thank You Quote this message in a reply
Mar. 01, 2014, 05:26 AM (This post was last modified: Mar. 01, 2014 05:27 AM by JJoe.)
Post: #14
RE: Block all youtube ads with Exceptions -U entry.
(Mar. 01, 2014 04:18 AM)Belarathon Wrote:  So far so good! Thanks.

Smile!

(Feb. 27, 2014 11:40 PM)Belarathon Wrote:  If you remove "|.doubleclick))" from the entry, the thumbnails will load. Now if I do that, do I need to have double parenthesis after the following part to close it?

Code:
(bin|hoc|lib)

Like so?

Code:
(bin|hoc|lib))

Huh, somehow I forgot to add the answer...

You would need three like

Code:
(bin|hoc|lib)))

Having one or two breaks the expression and removes it from the Proxomitron's list of expressions to check. You may verify this behavior at http://local.ptron/.pinfo/lists/AdPaths .

Also, after removing the # from

Code:
ad((id(^$TST(\3=n)(^$TST(\9=.)))|fu|js|s(x|(^=[^1-9]|(^?)))|vt
  |v($TST(\9=[/.])(^$TST(\3=c|:))|[0-9]|(^[^/.]))|x)([0-9][a-z0-9]+|)
  |[#0:*](^-)|(^$TST(\3={)|\=|/$TST(\3=>)|-(bin|hoc|lib)|.doubleclick))
#  &&\8&($TST(volat=*.log:[12]*)$ADDLST(Log-Rare,ALST AdP \8\t\u)|)

expression matches should add a line to Log-Rare.log that looks like

Code:
ALST AdP ads    http://www.youtube.com/results?search_query=proxo&page=9

This shows what was matched (ads) and where (http://www.youtube.com/results?search_query=proxo&page=9).

Then I checked the dbug for the page to see what filter.
Then I looked at the filter to find the keyword.

Code:
[Patterns]
Name = "<script> Block: Scripts by URL     10.10.16 [pr] (d.2)"
Active = TRUE
URL = "($TST(hCT=*html)|$TYPE(js)|$TYPE(vbs))$TST(flag=*.adurl:1.*)(^$TST(keyword=*.(a_ads|a_js|a_adjs|a_adjsex).*))"

Keywords on the left tend to allow more through. So I chose a_adjsex.


Have fun
Add Thank You Quote this message in a reply
[-] The following 1 user says Thank You to JJoe for this post:
Belarathon
Mar. 01, 2014, 02:20 PM
Post: #15
RE: Block all youtube ads with Exceptions -U entry.
Yeah Slick, I'm not even going to pretend I understand that. Wink No actually, I think I could do it! I wondered why that last line about the log was commented out. Now I know.
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: