Your script could be be condensed a little bit, assuming all these googlevideo.com domains are in fact ad domains (ergo: I haven't tested this!
) :
curl -s "https://api.hackertarget.com/hostsearch/?q=googlevideo.com" | awk -F, 'NR>1 {print $1}' | sudo tee /var/www/html/youtube-ads.txt
This creates a blacklist you can use at http://pi.hole/youtube-ads.txt ![]()