Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Damn YouTube is pushing the ads these days. I don't remember last time I opened YouTube and didn't see an ad on open. I'm logged into Chrome, no VPN or funny business. What a racket.


One of many possible solutions. This one no Javascript, no browser extensions, no Python, no libcurl, no "subscriptions", no BS.

      #!/bin/sh
      x(){ bssl client -connect www.youtube.com:443;};
      x(){ openssl s_client -connect www.youtube.com:443 -ign_eof;}; 
      read x;
      printf "%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\n" \
      "POST /youtubei/v1/player?key=AIzaSyA8eiZmM1FaDVjRy-df2KTyQ_vz_yYM39w HTTP/1.1" \
      "Host: www.youtube.com" \
      "Content-Type: x-www-form-urlencoded" \
      "Content-Length: 121" \
      "Connection: close" \
      "" \
      '{"videoId":"'$x'","context":{"client":{"clientName":"ANDROID","clientVersion":"17.10.35","androidSdkVersion":30}}}' \
      |x|sed -n "/itag=22&/{s/.*: ./<a href=/;s/\",/>$x<\/a>/p;}" 
Usage:

      echo RfNdaYqVxR0|1.sh > 1.htm
      chrome ./1.htm


I don't know anything about web tbh - what is that "key=AIzaSy[...]" bit? Is that a user id for duckduckgo private watching type of thing?


No, nothing personally identifiable about the so-called key. Every person who visits www.youtube.com uses the same one; it's public. Anyone can see it in the HTML page source for www.youtube.com. No need to be "logged in" or whatever the latest scheme is to track people for advertising purposes.


Try uBlock oirign my friend.


I know the idea of paying for things isn't cool or whatever, but there's also the option of paying for premium, which also gets rid of ads on mobile without using having to sideload some sketchy app.


Ublock isn't sketchy. Nor is NewPipe, which allows you to use it (and have favorites) without an account so there's less tracking. Premium doesn't let you do that, you pay but Google still gets to datamine you as much as they want as well.


Google don't deserve your money




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: