This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script will fetch the Googlevideo ad domains and append them to the Pi-hole block list. | |
# Run this script daily with a cron job (don't forget to chmod +x) | |
# More info here: https://discourse.pi-hole.net/t/how-do-i-block-ads-on-youtube/253/136 | |
# File to store the YT ad domains | |
FILE=/etc/pihole/youtube.hosts | |
# Fetch the list of domains, remove the ip's and save them | |
curl 'https://api.hackertarget.com/hostsearch/?q=googlevideo.com' \ |