Suggestion for blocking googlevideo ads

Various discussions related to Adblock Plus development
Post Reply
Dixiewrecked
Posts: 1
Joined: Fri Jul 28, 2017 1:45 pm

Suggestion for blocking googlevideo ads

Post by Dixiewrecked »

So, I think I have figured out how to block most if not all youtube/googlevideo ads. This will take a good enough regex filter that can do this:

Ignore:
Manifest.googlevideo.com
(r1-20) ---sn-2xouxaxq5u5-5cxs.googlevideo.com
(r1-20) ---sn-2xouxaxq5u5-5cxe.googlevideo.com
(r1-20) ---sn-2xouxaxq5u5-5cx?.googlevideo.com

note: those never change besides the last letter. Blocking those blocks the entire video from working at all. Also, there might be ads that are contained in those, but eliminating variants below should limit the amount of ads by a lot.


block urls such as: (This requires a regex that could cover all possibilities of the variants produced each time) Everything between the parenthesis randomizes minus the above urls. r2---sn(-p5qlsney).googlevideo.com and the numbers at the beginning goes up to 20 for each url. so something like this:

r1---sn-ab5l6nee.googlevideo.com
r2---sn-ab5l6nee.googlevideo.com
r3---sn-ab5l6nee.googlevideo.com
r4---sn-ab5l6nee.googlevideo.com
r5---sn-ab5l6nee.googlevideo.com
r6---sn-ab5l6nee.googlevideo.com
r7---sn-ab5l6nee.googlevideo.com
r8---sn-ab5l6nee.googlevideo.com
r9---sn-ab5l6nee.googlevideo.com
r10---sn-ab5l6nee.googlevideo.com
r11---sn-ab5l6nee.googlevideo.com
r12---sn-ab5l6nee.googlevideo.com
r13---sn-ab5l6nee.googlevideo.com
r14---sn-ab5l6nee.googlevideo.com
r15---sn-ab5l6nee.googlevideo.com
r16---sn-ab5l6nee.googlevideo.com
r17---sn-ab5l6nee.googlevideo.com
r18---sn-ab5l6nee.googlevideo.com
r19---sn-ab5l6nee.googlevideo.com
r20---sn-ab5l6nee.googlevideo.com

Variants: There's thousands of combinations

r2---sn-p5qlsney.googlevideo.com
r3---sn-ab5l6nle.googlevideo.com
r17---sn-p5qlsnse.googlevideo.com
r9---sn-ab5l6nl7.googlevideo.com
r1---sn-8pgbpohxqp5-h5oz.googlevideo.com


I have a few thousand or so collected that I've been forwarding to pixelserv and its limited the amount of ads even some unstoppable ones, but there's so many combinations and it takes a really long time to skim logs every time. So, if the list I have is needed to help with creating a filter for them. Then I'd be more than happy to provide it. It'd be great to be able to block it all with a simple filter that I can maybe use with privoxy which allows for using adblock filters.
lewisje
Posts: 2743
Joined: Mon Jun 14, 2010 12:07 pm

Re: Suggestion for blocking googlevideo ads

Post by lewisje »

This looks similar to what you're looking for (JS regex syntax here):

Code: Select all

/^https?:\/\/r[12]?\d---sn-\w{8}(?:\w{3}-\w{4})?\.googlevideo\.com(?:\/|:|$)/
@@/^https?:\/\/r[12]?\d---sn-2xouxaxq5u5-5cx\w\.googlevideo\.com(?:\/|:|$)/
Ideally you would put some request-type specifiers there, like $image,object,object-subrequest,media,websocket along with a domain specifier for the domains where this regex will actually be used.
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.
Post Reply