4 ms·
Youtube only plays an ad if (1) Youtube decides to offer an ad slot and (2) a buyer buys the ad slot. This happens in a fraction of a second based on what the a
by bdowling 5y ago
Youtube only plays an ad if (1) Youtube decides to offer an ad slot and (2) a buyer buys the ad slot. This happens in a fraction of a second based on what the ad buyers have programmed that they want to buy. Ad buyers usually want ads targeted to users in certain countries and with certain demographics (age, income level, etc.). If your location or demographics aren't what Youtube can sell to an ad buyer, you won't see an ad.
- 1vuio0pswjnm7 5y agoJust tried same video delegating DNS to Google's open resolver, aka 8.8.8.8, and within first 15 seconds I had a popup ad. What you say is accurate but that's not an explanation of why I see no ads. I use a local proxy in a unique, customised configuration that improves my UX. If I use third party DNS such as Google and stop using a proxy, I too will see those annoying Grammarly ads. Thats why I come up with workarounds.
- NavinF 5y agoI guess your local proxy (why?) sufficiently confused Google so they decided not to show you ads. You're definitely not blocking the ad domains via DNS because those domains don't exist
- OJFord 5y ago> I guess your local proxy (why?) Not GP, but if it reliably blocks YouTube ads I think a lot of people would be interested in doing that? As you say it's not possible via DNS; so can only be achieved in the browser, and in browsers with uBO. (I.e. not mobile apps, Android TV app, mobile browsers other than FF on Android, desktop browsers other than FF/Chrome/derivatives.)
- 1vuio0pswjnm7 5y agoHow does uBO accomplish this. Perhaps certain requests are necessary for ads. If true, then one way to avoid the ads is not to make the requests. This a guess: When we MITM our own traffic on our own network using a root certificate we make ourselves with openssl, the graphical browser may try to annoy us and makes us "click-through" a warning. It may effectively block a request. If the request is for an ad, then ... TBH, I am not convinced that I have a solution that works on every video. This is why I ask for examples. However I never see ads with the videos I watch, so it does work on some. I generally do not watch stuff that is heavily commercialised. Also I normally download the entire video before watching; I dislike so-called "streaming" and Javascript video players. I need more examples I can test. All the videos submitted to HN seem to work. I need other examples.
- OJFord 5y ago> How does uBO accomplish this. DOM/content manipulation. > Also I normally download the entire video before watching; I dislike so-called "streaming" and Javascript video players. How do you do that? It's probably that. (That's also unfortunately a browser / 'use a different app' solution rather than something that'll work for the YouTube app on iOS/Android/TV devices.)
- 1vuio0pswjnm7 5y agoThere are two types of YouTube ads, right. The pop-up (pop-over) and the "pre-roll" (today, periodic roll). IOW, the ads are either opening in their own little window or they are themselves video files. Does DOM/content manipulation mean certain .js is not run. For example, requests for that .js is external and are not made. When I am testing people's claims that YouTube ads cannot be "blocked" except with uBlock, I am using the same graphical browser that most people use. I do not believe these claims. I can prove there are other ways to retrieve videos without retrieving ads. When I am not disproving those claims, I use the commandline (netcat + TLS proxy + ftp) to download video. This is the fastest and easiest way to use YouTube for me. It is extremely simple. No python required. Just some simple URL decoding and a little grep. I see no reason to use the graphical browser to download video. Thats overkill. Thats why people end up seeing ads, IMO. I may use the browser for playing media files offline but not for making HTTP requests.
- NavinF 5y agoYou can stop certain js files from running, but it's way more fine grained than that. Blocking external scripts would lead to massive breakage. If you wanna know how ad filters work, look at a filter list: https://easylist.to/easylist/easylist.txt https://easylist.to/easylist/easylist.txt > I can prove there are other ways to retrieve videos without retrieving ads. Go ahead? There is no technical reason why Google can't serve you ads. You are not using DOM filters and we've already established that your DNS filter has no effect on YouTube. Google is choosing not to show you ads > I use the commandline (netcat + TLS proxy + ftp) to download video > URL decoding and a little grep Eww, that'll break every time YouTube changes their ui. None of that is necessary. youtube-dl works with pretty much every video site, does not require a wacky setup, and it tracks YouTube changes pretty much instantly. It also works with playlists, entire channels, etc. You'll spend years replicating all the little features like quality selection, subtitles, etc if you use shell scripting for that.