Heres a python script I made up from just modifying another script I use, it depends on qbittorrent-api, but to use just fill out the connection info and add all the trackers you want to remove in the TRACKERS
array, I've included 2 rarbg trackers just as an example.
#!/usr/bin/env python3
import qbittorrentapi
import sys
TRACKERS = [
"udp://9.rarbg.to:2770/announce",
"udp://9.rarbg.me:2730/announce"
]
conn_info = dict(
host = "qbittorrent.localhost",
port = 80,
username = "admin",
password = "PASSWORD"
)
def main (argv, argc):
qbt_client = qbittorrentapi.Client(**conn_info)
try:
qbt_client.auth_log_in()
except qbittorrentapi.LoginFailed as e:
print(e)
return 1
for torrent in qbt_client.torrents_info():
#urls = []
#for tracker in torrent.trackers:
#print(tracker)
#urls.append(tracker.url)
torrent.remove_trackers(urls=TRACKERS)
#torrent.add_trackers(urls=TRACKERS)
qbt_client.auth_log_out()
return 0
if __name__ == "__main__":
sys.exit(main(sys.argv, len(sys.argv)))
The 203 error you got is because your script isnt a valid executable, it needs to have a shebang at the top, you can change it to something like this and set the executable bit with
chmod +x <file>
this tells it to run using bash as the interpreter.
Im not familliar with this google drive software, but im figuring that its exiting with an error code cuz its running as a system service, and $HOME probobly isnt set so
~
doesnt expand and the software gets an invalid path.But I recommend using a user service for this, it will run when you login, you should be able to copy the service file you already have into
~/.config/systemd/user/
and runsystemctl --user daemon-reload
andsystemctl --user enable startup.service --now
, this will enable and start the service in one go.I also recommend adding the following lines under
[Service]
idk if the software will exit if it loses network or wifi or anything, but this will have it automatically restart after 60 seconds, should it exit for any reason.
If you need it to run before login, it is possible to do with a system service, but it will need a bit more setup