Post Reply 
[Req] Remove youtube clip ads
Aug. 29, 2008, 02:01 PM
Post: #1
[Req] Remove youtube clip ads
If there a way to remove that ads that pops up in the bottle half of the screen when a video is playing.

http://www.youtube.com/watch?v=QmDR5SrKtt0&fmt=18


[Image: youtubeadsia5.png]
Quote this message in a reply
Sep. 03, 2008, 05:55 PM
Post: #2
RE: [Req] Remove youtube clip ads
Hi unknown!!

The banner is inserted by the second script of the page, when creating the flashvars tag for the embed video. If we delete the full flashvars declaration the video will not play, but deleting ad_module with his value inside flashvars, the video will play full, without stopping at the point of the ad. So here is the filter, hope you enjoy it Wink

Ah, if you are from google i'm looking for a job, lol.
Code:
Name = "<script> Youtube: Kill video-ads [LN] 080903"
Active = TRUE
URL = "$TYPE(htm)[^/]++.youtube.com/"
Bounds = "$NEST(<script,*</script>)"
Limit = 32767
Match = "\1\"ad_module\"*,\2"
Replace = "\1\2"
Add Thank You Quote this message in a reply
Sep. 03, 2008, 10:19 PM
Post: #3
RE: [Req] Remove youtube clip ads
Awesome find Inminente!

Here's my take on the filter:

Code:
[Patterns]
Name = "<script> Youtube: Kill video-ads [LN] 080903 {ku}"
Active = TRUE
URL = "$TYPE(htm)([^.]+.|)youtube.com"
Limit = 20
Match = "(\&|"|\s)\1ad_(host(_tier|)|module|channel_code|video_pub_id|eurl)(=|"|\s)\2"
Replace = "\1foo\2"
Visit this user's website
Add Thank You Quote this message in a reply
Sep. 04, 2008, 09:07 PM
Post: #4
RE: [Req] Remove youtube clip ads
====================USE THIS OR THE ONE FROM KYE-U
This is the filter i will use:
Code:
Name = "<script> Youtube: Kill video-ads {ln,ku}080904"
Active = TRUE
URL = "$TYPE(htm)[^/]++.youtube.com/"
Bounds = "$NEST(<script,</script>)"
Limit = 32767
Match = "((*swfArgs = )\#"
        "($NEST({,})&&("
        "(\#(\"ad_\w*\",))+"
        "\#)))"
        "(* watchDCURL = \")\1*(\";*)"
        "\2"
Replace = "\@ \1 \2"

The reason because i use this and not the one from Kye-U is because of the next filter i use to prevent modifications in scripts:
Code:
Name = "{no_change}<scripts inline> Preserve {ln}080901"
Active = TRUE
URL = "$TYPE(htm)(^*youtube.com*)"
Bounds = "$NEST(<script*,</script>)"
Limit = 32767
Match = "($NEST(<script,\2,>)*)\1"
        "(^$TST(\2=*\ssrc=*))"
Replace = "\1"


=========WORSE FILTERS===============
The next filters are for showing videos with javascript disabled.
_______________________________________________

.- Removing ads but not higher resolution:

Code:
Name = "<div|script> Youtube: Kill video-ads and allowing no javascript {ln}080904"
Active = TRUE
URL = "$TYPE(htm)[^/]++.youtube.com/"
Bounds = "$NEST(<div id="watch-noplayer-div">,</div>)|$NEST(<script,</script>)"
Limit = 1200
Match = "(<d*&$URL(http://www.youtube.com/watch?v=\1) )$SET(\2=<object width="480" height="385"><param value=""
        "http://www.youtube.com/v/\1"
        "&amp;fs=1" name="movie"/><param value="true" name="allowFullScreen"/><embed width="480" height="385" allowfullscreen="true" type="application/x-shockwave-flash" src=""
        "http://www.youtube.com/v/\1"
        "&amp;fs=1"/></object>)"
        "|"
        "(<s*writeMoviePlayer\("watch-player-div"\);*)"
Replace = "\2"


.- Removing ads and seeing in higher resolution:
This filter searchs for the name of the swf file in higher resolution, and follow until the div where the video is inserted. Inserts it there, and adds flashvars with the name of the original swf and a few codes that lets a faster download of the higher quality version. Closes the embed tag and follows to anulate a script wich rewrites the div where video is inserted.

Code:
Name = "<div|script> Youtube HD: Kill video-ads and allowing no javascript {ln}080905b"
Active = FALSE
Multi = TRUE
URL = "$TYPE(htm)[^/]++.youtube.com/"
Limit = 26000
Match = "(($NEST(<script,</script>)&&(*swfUrl \= canPlayV9Swf\(\)  \? '\1' *))*)\2"
        "$NEST(<div id="watch-noplayer-div">,</div>)"
        "(*writeMoviePlayer\(\")\3"
        "watch-player-div"
        "(*</script>)\4"
        "$URL(http://www.youtube.com/watch?v=\5\&*)"
        "$STOP()"
Replace = "\2"
          "<object width="480" height="385"><param value="\1&fs=1" name="movie"/>"
          "<param value="true" name="allowFullScreen"/><embed height="385" width="480" flashvars="&amp;video_id="
          "\5"
          "&amp;fmt_map=18/512000/9/0/115&amp;vq=2"  allowfullscreen="true" quality="high" bgcolor="#FFFFFF" name="movie_player" id="movie_player" "
          "style="" src="http://s.ytimg.com/yt/swf/watch-vfl53733.swf" type="application/x-shockwave-flash"/></object>"
          "\3\4"

It needs the following header filter form Kye-U
Code:
In = FALSE
Out = TRUE
Key = "URL: Youtube: High Quality (ku) (Out)"
URL = "(\w.|)youtube.com/(watch\?v\=|v/)"
Match = "\1((^$TST(\1=*\&fmt=18*))$SET(9=$JUMP(\1&fmt=18))|$SET(9=\1))"
Replace = "\9"
Add Thank You Quote this message in a reply
Sep. 05, 2008, 11:15 PM
Post: #5
RE: [Req] Remove youtube clip ads
WOW! Thankyou Smile!
Quote this message in a reply
Sep. 05, 2008, 11:52 PM
Post: #6
RE: [Req] Remove youtube clip ads
i'm totally LOST...
how many of those filters should i be importing? one? two? all?
and i'm seeing filters further down in the post with datestamps previous to datestamps higher up in the post...


edit: okay, after resting my eyes, i'm on track now, lol...


(and bummer, Mets/Phillies rained out, double-header tomorrow - Go METS!!!)



edit2 - ooh, you edited while i was posting, much appreciated, much easer to follow now, thanks again...
Add Thank You Quote this message in a reply
Sep. 06, 2008, 06:56 PM
Post: #7
RE: [Req] Remove youtube clip ads
Thanks to you Wink
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: