25 lines
576 B
Bash
Executable File
25 lines
576 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
truncate -s 0 build/YT-LIST
|
|
|
|
while read -r channel; do
|
|
cat <<-EOF >> build/YT-LIST
|
|
# Blocking youtube channel: ${channel}
|
|
www.youtube.com##a[href*="/${channel}"]:upward(5)
|
|
www.youtube.com##.yt-formatted-string.style-scope.yt-simple-endpoint[href="/${channel}"]:upward(8)
|
|
|
|
EOF
|
|
done < yt-channels
|
|
|
|
truncate -s 0 build/SITES-LIST
|
|
|
|
while read -r hostname; do
|
|
cat <<-EOF >> build/SITES-LIST
|
|
# Blocking site ${hostname} from google search
|
|
www.google.*##.g:has(a[href*="${hostname}"])
|
|
www.google.*##a[href*="${hostname}"]:upward(1)
|
|
|
|
EOF
|
|
done < sites
|