Full Code of amgxv/SpotifyAdBlocker-macOS for AI

master 3e9c7a7f5d9d cached
6 files
5.6 KB
2.0k tokens
1 requests
Download .txt
Repository: amgxv/SpotifyAdBlocker-macOS
Branch: master
Commit: 3e9c7a7f5d9d
Files: 6
Total size: 5.6 KB

Directory structure:
gitextract_wep5kx1e/

├── README.md
├── hosts/
│   ├── hosts.txt
│   └── old_hosts.txt
├── install.sh
├── uninstall.sh
└── update.sh

================================================
FILE CONTENTS
================================================

================================================
FILE: README.md
================================================
# SpotifyAdBlocker-macOS

## DISCLAIMER : I can't maintain this project anymore as I don't have a Mac. PR will be reviewed and accepted.

---

Script based on [Ruvelro/Spotihosts](https://github.com/ruvelro/Spotihosts) which adds a few lines to hosts file to block Spotify ads.

## Install 

Run this at the Terminal : 
`sudo bash -c "$(curl -Ss https://raw.githubusercontent.com/amgxv/SpotifyAdBlocker-macOS/master/install.sh)"`

### Uninstall

Run this at the Terminal : 
`sudo bash -c "$(curl -Ss https://raw.githubusercontent.com/amgxv/SpotifyAdBlocker-macOS/master/uninstall.sh)"`

### Update 

Run this at the Terminal : 
`sudo bash -c "$(curl -Ss https://raw.githubusercontent.com/amgxv/SpotifyAdBlocker-macOS/master/update.sh)"`

### How can I assure that hosts are enabled or deleted?
* Open your Terminal
* Run ```cat /private/etc/hosts```
* If you can see the following [hosts](https://raw.githubusercontent.com/amgxv/SpotifyAdBlocker-macOS/master/hosts/hosts.txt) below ```#[Spotify Ad-Block Hosts]``` line you have the correct hosts configured.
* If you want to fully assure that hosts are completely removed from your system, check if there are hosts remaining from other Spotyblock versions
* You can edit this hosts file with your favorite text editor, you'll need admin privileges to edit this file


================================================
FILE: hosts/hosts.txt
================================================
0.0.0.0 adeventtracker.spotify.com
:: adeventtracker.spotify.com
0.0.0.0 ads-fa.spotify.com
:: ads-fa.spotify.com
0.0.0.0 analytics.spotify.com
:: analytics.spotify.com
0.0.0.0 audio2.spotify.com
:: audio2.spotify.com
0.0.0.0 b.scorecardresearch.com
:: b.scorecardresearch.com
0.0.0.0 bounceexchange.com
:: bounceexchange.com
0.0.0.0 bs.serving-sys.com
:: bs.serving-sys.com
0.0.0.0 content.bitsontherun.com
:: content.bitsontherun.com
0.0.0.0 core.insightexpressai.com
:: core.insightexpressai.com
0.0.0.0 crashdump.spotify.com
:: crashdump.spotify.com
0.0.0.0 desktop.spotify.com
:: desktop.spotify.com
0.0.0.0 ds.serving-sys.com
:: ds.serving-sys.com
0.0.0.0 gtssl2-ocsp.geotrust.com
:: gtssl2-ocsp.geotrust.com
0.0.0.0 log.spotify.com
:: log.spotify.com
0.0.0.0 media-match.com
:: media-match.com
0.0.0.0 omaze.com
:: omaze.com
0.0.0.0 redirector.gvt1.com
:: redirector.gvt1.com
0.0.0.0 s0.2mdn.net
:: s0.2mdn.net
0.0.0.0 v.jwpcdn.com
:: v.jwpcdn.com
0.0.0.0 weblb-wg.gslb.spotify.com
:: weblb-wg.gslb.spotify.com
0.0.0.0 www.omaze.com
:: www.omaze.com

================================================
FILE: hosts/old_hosts.txt
================================================
0.0.0.0 adeventtracker.spotify.com
:: adeventtracker.spotify.com
0.0.0.0 ads-fa.spotify.com
:: ads-fa.spotify.com
0.0.0.0 analytics.spotify.com
:: analytics.spotify.com
0.0.0.0 audio2.spotify.com
:: audio2.spotify.com
0.0.0.0 b.scorecardresearch.com
:: b.scorecardresearch.com
0.0.0.0 bounceexchange.com
:: bounceexchange.com
0.0.0.0 bs.serving-sys.com
:: bs.serving-sys.com
0.0.0.0 content.bitsontherun.com
:: content.bitsontherun.com
0.0.0.0 core.insightexpressai.com
:: core.insightexpressai.com
0.0.0.0 crashdump.spotify.com
:: crashdump.spotify.com
0.0.0.0 desktop.spotify.com
:: desktop.spotify.com
0.0.0.0 ds.serving-sys.com
:: ds.serving-sys.com
0.0.0.0 gtssl2-ocsp.geotrust.com
:: gtssl2-ocsp.geotrust.com
0.0.0.0 log.spotify.com
:: log.spotify.com
0.0.0.0 media-match.com
:: media-match.com
0.0.0.0 omaze.com
:: omaze.com
0.0.0.0 redirector.gvt1.com
:: redirector.gvt1.com
0.0.0.0 s0.2mdn.net
:: s0.2mdn.net
0.0.0.0 v.jwpcdn.com
:: v.jwpcdn.com
0.0.0.0 weblb-wg.gslb.spotify.com
:: weblb-wg.gslb.spotify.com
0.0.0.0 www.omaze.com
:: www.omaze.com
.0.0.0 omaze.com
0.0.0.0 spclient.wg.spotify.com


================================================
FILE: install.sh
================================================
#!/usr/bin/env bash

if [ "$EUID" -ne 0 ]; then
  printf "\nThis script needs to be run as root.\nPassword will be asked...\n"
  sudo "$0"
  exit
fi

clear
printf "\nThis script will edit your hosts file... \n"
printf "\nDo you want to continue? [y|n] \n"
read -r conf

if [[ $conf = Y ]] || [[ $conf = y ]]; then
  clear
  
  if grep -q "Spotify Ad-Block Hosts" "/private/etc/hosts"; then
    printf "You have already ran this script\n"
    read -rp "  Press enter to exit"
    clear
    exit 0
  fi
  
  echo -e "#[Spotify Ad-Block Hosts]" >> "/private/etc/hosts"
  curl -Ss https://raw.githubusercontent.com/amgxv/SpotifyAdBlocker-macOS/master/hosts/hosts.txt -o /tmp/spotyblockhosts
  while read -r line
  do
    echo -e $line >> "/private/etc/hosts"
  done < "/tmp/spotyblockhosts"

  rm /tmp/spotyblockhosts
  killall mDNSResponder
  killall mDNSResponderHelper
elif [[ $conf = N ]] || [[ $conf = n ]]; then
  clear
  exit 0
else
	printf "\nInvalid value, program will exit...\n"
	read -rp "  Press enter to exit"
	exit 1
fi

if grep -q "Spotify Ad-Block Hosts" "/private/etc/hosts"; then
  clear
  printf "Hosts file modified successfully!
  Enjoy Spotify without Ads\n"
  read -rp "  Press enter to exit"
  clear
else
  clear
  printf "Error modifying hosts file :c\n"
  read -rp "  Press enter to exit"
  clear
fi


================================================
FILE: uninstall.sh
================================================
#!/usr/bin/env bash

echo "Uninstalling Spotyblock..."
sudo sed -i -e "/#\[Spotify Ad-Block Hosts\]/d" "/private/etc/hosts"
curl -Ss https://raw.githubusercontent.com/amgxv/SpotifyAdBlocker-macOS/master/hosts/hosts.txt -o /tmp/spotyblockhosts
curl -Ss https://raw.githubusercontent.com/amgxv/SpotifyAdBlocker-macOS/master/hosts/old_hosts.txt -o /tmp/spotyblockoldhosts

while read -r line
do
  sudo sed -i -e "/$line/d" "/private/etc/hosts"
done < "/tmp/spotyblockhosts"

while read -r line
do
  sudo sed -i -e "/$line/d" "/private/etc/hosts"
done < "/tmp/spotyblockoldhosts"

rm /tmp/spotyblockhosts
rm /tmp/spotyblockoldhosts
sudo killall mDNSResponder
sudo killall mDNSResponderHelper


================================================
FILE: update.sh
================================================
#!/usr/bin/env bash

bash <(curl -Ss https://raw.githubusercontent.com/amgxv/SpotifyAdBlocker-macOS/master/uninstall.sh)
bash <(curl -Ss https://raw.githubusercontent.com/amgxv/SpotifyAdBlocker-macOS/master/install.sh)
Download .txt
gitextract_wep5kx1e/

├── README.md
├── hosts/
│   ├── hosts.txt
│   └── old_hosts.txt
├── install.sh
├── uninstall.sh
└── update.sh
Condensed preview — 6 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (6K chars).
[
  {
    "path": "README.md",
    "chars": 1316,
    "preview": "# SpotifyAdBlocker-macOS\n\n## DISCLAIMER : I can't maintain this project anymore as I don't have a Mac. PR will be review"
  },
  {
    "path": "hosts/hosts.txt",
    "chars": 1056,
    "preview": "0.0.0.0 adeventtracker.spotify.com\n:: adeventtracker.spotify.com\n0.0.0.0 ads-fa.spotify.com\n:: ads-fa.spotify.com\n0.0.0."
  },
  {
    "path": "hosts/old_hosts.txt",
    "chars": 1106,
    "preview": "0.0.0.0 adeventtracker.spotify.com\n:: adeventtracker.spotify.com\n0.0.0.0 ads-fa.spotify.com\n:: ads-fa.spotify.com\n0.0.0."
  },
  {
    "path": "install.sh",
    "chars": 1323,
    "preview": "#!/usr/bin/env bash\n\nif [ \"$EUID\" -ne 0 ]; then\n  printf \"\\nThis script needs to be run as root.\\nPassword will be asked"
  },
  {
    "path": "uninstall.sh",
    "chars": 688,
    "preview": "#!/usr/bin/env bash\n\necho \"Uninstalling Spotyblock...\"\nsudo sed -i -e \"/#\\[Spotify Ad-Block Hosts\\]/d\" \"/private/etc/hos"
  },
  {
    "path": "update.sh",
    "chars": 219,
    "preview": "#!/usr/bin/env bash\n\nbash <(curl -Ss https://raw.githubusercontent.com/amgxv/SpotifyAdBlocker-macOS/master/uninstall.sh)"
  }
]

About this extraction

This page contains the full source code of the amgxv/SpotifyAdBlocker-macOS GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 6 files (5.6 KB), approximately 2.0k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!